Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ansible: Configuration Management Simplified

Ansible: Configuration Management Simplified

Ausmarton Zarino Fernandes

August 31, 2013
Tweet

More Decks by Ausmarton Zarino Fernandes

Other Decks in Technology

Transcript

  1. What makes it different? • No custom crypto • No

    daemons • Human readable • Lot of prepackaged modules • A complete tool suite • Features a “dry-run” mode
  2. Why not to use ansible? • Young project • Relatively

    smaller ecosystem • Managing very large infrastructures
  3. Inventory • Non standard SSH port web1.example.com:5309 • Custom aliases

    my_alias ansible_ssh=5555 ansible_ssh_host=192.168.10.12 • Wildcards, regular expressions • Host variables myhost http_port=80 • Group variables [mygroup:vars] http_port=80
  4. Playbooks • Ansible’s orchestration language • Manage configurations • Manage

    deployments • Consists of play(s) • Plays contain task lists
  5. Writing a Playbook • tags • facts • Variables •

    Jinja2 syntax {% if host in groups[‘web’] %} ... {% endif %} • Notify/handlers • ansible-playbook playbook.yml
  6. Roles • Automatically include vars, templates required • Predefined file

    structure roles/ my_role/ files/ templates/ tasks/ handlers/ vars/ meta/
  7. ansible-pull • Remote copy of ansible • Run via cron

    • Pull playbooks from git • Scalability
  8. • AnsibleWorks - http://www.ansibleworks.com/ • MongoDB+Flask - http://docs.mongodb.org/ecosystem/tutorial/write-a- tumblelog-application-with-flask-mongoengine/ •

    http://blog.liangzan.net/blog/2012/11/05/first-impressions-of-the- ansible-configuration-management-tool/ • Jinja 2 - http://jinja.pocoo.org/docs/templates/ References https://github.com/ausmarton/ansible-pycon-2013 Demo code