Computing UNIX Nerd (started in 1986 with SunOS 3) Linux Geek (started in 1992 with 0.96α) Scripting Nerd Configuration Management addict Free and Open Source Software enthusiast HAM Operator (pa1ton) Programming Plain text aficionado Big fan of things that just work · · · ans-v1.8-3
⇒ Widely used, master / slave Chef ⇒ Puppet lookalike, configured through Ruby Ansible ⇒ Easy to use, configured through yaml Salt Stack ⇒ master / slave Propellor ⇒ master / slave, configured through Haskell Juju ⇒ Ubuntu, designed for the cloud Capistrano ⇒ Scripting in Ruby Fabric ⇒ Python Library for CM (Only Python 2) Invoke ⇒ Python 3 successor of Fabric1 Paver ⇒ Fabric alternative for Python 3 · · · 1Seems to be the successor, but still beta. Has the same author ans-v1.8-5
master No more agents on the nodes No databases No separate PKI Uses standard SSH functionality Very, very powerful Configuration, deployment, ad-hoc, continuous delivery Simple configuration files (yaml) Idempotent ⇒ f(x) = f(f(x)) No convergence ans-v1.8-7
+ Paramiko, PyYAML, Jinja2 on master Python 2.4 + simplejson on nodes Can run in Python virtualenv Can run from git checkout Uses SSH for transport and login No root needed, can use sudo, pbrun, pfexec, etc. ans-v1.8-8
command ansible-playbook ⇒ Command to run playbooks ansible-pull ⇒ The main Ansible pull command ansible-doc ⇒ Ansible documentation program ansible-galaxy ⇒ Command to interact with Galaxy ansible-vault ⇒ The Ansible password vault ans-v1.8-9
# pip install ansible On CentOS / RHEL / Scientific Linux Enable the EPEL repository # yum install ansible On Debian / Ubuntu Available in standard repository # apt-get install ansible From github (Bleeding edge) Install and configure git $ git clone http://github.com/ansible/ansible.git $ cd ansible $ sudo make install ans-v1.8-11
server master1.example.net 192.168.56.101/24 web1.example.net 192.168.56.102/24 db1.example.net 192.168.56.103/24 web2.example.net 192.168.56.104/24 DNS server dns1.example.net 192.168.56.105/24 ans-v1.8-13
Comments Conditionals Filters Ansible facts are available Puppet Facter facts are available (if installed) Chefs Ohai facts are available (if installed) ans-v1.8-23
of organizing things Can easily be shared with others (Through Galaxy) Ansible role directory structuur thisrole.............................................................Top of the role files..................................................................Role files handlers..........................................................Role handlers main.yml.............................................Role handlers start tasks..................................................................Role tasks main.yml.............................................Role starting point templates........................................................Role templates vars..............................................................Role variables main.yml............................................Role variables start ans-v1.8-25
become for root commands Configure authorized_keys for connections Run ansible script every hour Log playbook runs to /var/log/ansible.log Use Ansible callbacks to give feedback Use roles as much as possible Make roles generic Define variables for site configuration ans-v1.8-27
#ansibleu Meetups: http://meetup.com/Ansible-Benelux Twitter: @ansible and @AnsibleBenelux Reddit: http://www.reddit.com/r/ansible Google Group: https://groups.google.com Weekly newsletter: https://valdhaus.com Checkout and study the source from github · · · ans-v1.8-28