Approachable & up-to-date!
Ansible is written by Python folk, so you've gotta do a wee bit of that:
pip install paramiko PyYAML jinja2
git clone [email protected]:ansible/ansible.git ~/?/
echo "source ~/?/ansible/hacking/env-setup -q" \
By default, Ansible looks for your inventory file at /etc/ansible/hosts
shared-dev ansible_ssh_host=fqdn ansible_ssh_user=user
prod ansible_ssh_host=fqdn ansible_ssh_user=user
bitcoins ansible_ssh_host=fqdn ansible_ssh_user=user
Use individual ansible modules to do stuff to all (or some (or one)) your machines at once.
ansible all -m copy -a "src=~/.bashrc dest=/var/tmp/bashrc"
ansible work -m apt -a "name=cowsay"
ansible work -m shell -a "cowsay Hooray Ansible"
ansible localhost -m homebrew -a "name=cowsay"
Playbooks are a bundled set of one-offs, saved in a yaml file.
These get too lengthy for a slide; check out this simple starter playbook.
config.vm.network :private_network, ip: "192.168.111.222"
config.vm.provision :ansible do |ansible|
ansible.playbook = "../ansible-starter/playbook.yml"
ansible.inventory_file = "../ansible-starter/hosts"
Sometimes, when you run
vagrant up, you'll get unexpected
failures. Before getting distraught, try running
and perhaps (if that fails, too)
vagrant up (or
vagrant provision) again.
Fork me on Github