24 years old Loves spicy food Developer @ TravelBird Python user since 2009 Linux user since around 2003 Big fan of Open Source Nick Groenen Twitter: @NickGroenen Web: https://zoni.nl Email: [email protected]
$ vagrant up Bringing machine 'lb1' up with 'virtualbox' provider... Bringing machine 'web1' up with 'virtualbox' provider… Bringing machine 'web2' up with 'virtualbox' provider...
Ansible leverages SSH. No daemons to setup, no (extra) permissions to manage, we're ready to roll! pip install ansible or aptitude install ansible or yum install ansible or emerge ansible
/etc/ansible/hosts [loadbalancers] lb1 ansible_ssh_host=192.168.99.10 [webservers] web1 ansible_ssh_host=192.168.99.11 web2 ansible_ssh_host=192.168.99.12 ansible_ssh_host is only necessary because Vagrant VM's aren't in DNS
failed: [lb1] => {"failed": true} msg: failed to validate: rc:1 error:nginx: [emerg] directive "pid" is not terminated by ";" in /home/vagrant/. ansible/tmp/ansible-1380702362.41-73682544006063/source:5 nginx: configuration file /home/vagrant/.ansible/tmp/ansible- 1380702362.41-73682544006063/source test failed FATAL: all hosts have already failed -- aborting If you screwed up
lb1 | success | rc=0 >> Linux 3.8.0-30-generic #44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 2013 web1 | success | rc=0 >> Linux 3.8.0-30-generic #44-Ubuntu SMP Thu Aug 22 20:52:24 UTC 2013 web2 | FAILED => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
Closing words ● Ignored all best practices for demonstration (use roles!) ● Made many assumptions http://www.ansibleworks.com/quickstart-video/ http://www.ansibleworks.com/docs