78
edits
Changes
Formatting errors
====You may want to use ansible for:====
* Quickly running a command against all running hosts
* Testing changes against a subset of all running hosts
====Reasons to use Ansible:====
* It has lots of nice builtin modules (see the [[http://docs.ansible.com/ docs]])
* You can define orchestration tasks in a repeatable, clean way, by simply writing them as a playbook (YAML)
1.) Make sure you have AWS creds, and the AWS_SECRET_KEY and AWS_ACCESS_KEY_ID environment variables set
2.) <code>pip install ansible</code>
3.) <code>git clone https://github.com/catlee/build-ansible/</code>
4.) set the environment variable <code>ANSIBLE_HOST_KEY_CHECKING=False</code> to prevent prompts for adding boxes to known hosts
5.) use ssh-agent to prevent needing to type your passcode thousands of times >.<
Add a file "/tmp/foo" to every tst-linux64 host: <code>ansible -u root -i ec2-inventory.py -a "touch /tmp/foo" tst-linux64</code>
Rm the file: <code>ansible -u root -i ec2-inventory.py -a "rm /tmp/foo" tst-linux64</code>
Similarly, replace tst-linux64 with tst-linux32, try-linux32, etc...