Ansible has huge potential, also working with docker. These slides give an introduction to how Ansible works and can be used to automate and improve your infrastructure setup.
11. Not enough?
• Create your own!
http://docs.ansible.com/ansible/developing_modules.html
• Use the shell module:
- name: do what you want
shell: ./do_all_the_things.sh
12. Play
- name: ensure apache is at the latest version
yum: pkg=httpd state=latest
- name: write the apache config file
template: src=httpd.j2 dest=/etc/httpd.conf
notify:
- restart apache
- name: ensure apache is running
service: name=httpd state=started
13. Playbook
---
- hosts: web
remote_user: root
vars:
http_proxy=http://main-proxy.eu.company.corp:8080
tasks:
[...]
hosts: db
remote_user: root
tasks:
[...]
19. Demo
Control Machine Requirements
• Python 2.6 or 2.7 (Windows isn’t supported for the control machine)
Managed Node Requirements
• Take Python 2.5 or newer