Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paweloczadly/2b752beb9cdcbddd4534 to your computer and use it in GitHub Desktop.
Save paweloczadly/2b752beb9cdcbddd4534 to your computer and use it in GitHub Desktop.
Ansible - superluminal way to infrastructure automation - Warsjawa

About

Luzne notatki z warsztatow 'Ansible - superluminal way to infrastructure automation' na Warsjawa 2014

Comparsion with Puppet, Chef

  • Ansible agentless.
  • Almost nothing on the machine
  • Python does the work

Under the hood

  • YAML & Jinja2

Example

Updating ansible.

  • Playbook structure:
    • group_vars
    • host_vars
    • inventory
    • roles
    • site.yml
  • site.yml content:
---
- hosts: localhost
  sudo: True
  tasks:
    - name: "Add Ansible repository"
      apt_repository:
        repo: "ppa:ansible/ansible"
        state: present
    - name: "Upgrade Ansible"
      apt:
        name: "ansible"
        state: "latest"
  • inventory content:
localhost_ansible=local

Ansible Galaxy

Something similar to Chef supermarket:

https://galaxy.ansible.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment