Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify exactly how and where Ansible runs (bootstrap, production crontask, development) #37

Merged
merged 9 commits into from Dec 16, 2014

Conversation

djmitche
Copy link
Member

@djmitche djmitche commented Dec 7, 2014

This should help illustrate my mailing-list conversation wondering exactly how we should accomplish this.

Because this won't work well in development (it will always look at
prod-hosts), it's easily disabled with no_ansible_pull=true in the
inventory. Fixes #3089.

@@ -41,3 +41,6 @@ utility_packages:
- bash
- screen
- vim-lite # we probably do not want to bring all the stuff

# The upstream repository from which the service host crontask should pull
ansible_git_repository: https://github.com/buildbot/buildbot-infra
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use git://

@djmitche
Copy link
Member Author

I need to revise this to run local.yml, among other comments above.

name: ansible
state: present

- name: create service account
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to agree where we create the service account :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here makes sense - this is where it's used anyway.

@djmitche djmitche force-pushed the pull-cron branch 3 times, most recently from c1ab0eb to 109aca1 Compare December 14, 2014 19:06
@djmitche
Copy link
Member Author

OK, this is ready for more review. The scope has widened a bit, and I've adjusted the summary to correspond.

@djmitche djmitche changed the title [WIP] Run ansible in a crontask on service hosts Specify exactly how and where Ansible runs (bootstrap, production crontask, development) Dec 14, 2014
@djmitche djmitche removed the merge-me label Dec 14, 2014
ssh $SSH_ARGS $HOSTNAME git clone --depth 1 git://github.com/buildbot/buildbot-infra repo

# Run local.yml. This will take care of the real setup
ssh $SSH_ARGS $HOSTNAME ansible-playbook --ask-vault-pass -i repo/localhost repo/local.yml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious if sudo is enabled to root by default...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears it is:

root ALL=(ALL) ALL

@sa2ajj
Copy link

sa2ajj commented Dec 15, 2014

👍

I'd wait for @seankelly's comments though.


ansible-playbook local.yml

To avoid installing a the Ansible crontask, add ``-e no_ansible_pull=true``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra word in this sentence.

@seankelly
Copy link
Member

Also looks good to me.

djmitche added a commit to djmitche/buildbot-infra that referenced this pull request Dec 16, 2014
@djmitche djmitche merged commit 6e505d0 into buildbot:master Dec 16, 2014
@djmitche
Copy link
Member Author

Deployed on service3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants