Ansible

Configuration Management for Humans

MANATí

Kevin Porras Zumbado

Director of Technology
@kporras07

Who am I?

MANATí

Configuration Management

MANATí

Options

MANATí

  • Bash Scripts
  • CFEngine
  • Puppet
  • Chef
  • Ansible

Ansible

MANATí

  • Agent-free
  • Secure (ssh)
  • Low learning curve
  • Over 750 modules

Inventory

MANATí

Hosts

Groups

Groups of Groups

MANATí

host0

[atlanta]
host1
host2

[raleigh]
host2
host3

[southeast:children]
atlanta
raleigh

Standalone Commands

MANATí

ansible all -m ping

MANATí

ansible all -a "/bin/echo hello"

MANATí

Playbooks

MANATí

Tasks

MANATí

- name: Update apt cache if needed.
  apt: update_cache=yes cache_valid_time=86400

Handlers

MANATí

- name: restart mysql
  service: "name=mysqld state=restarted"

Includes

MANATí

# Tasks
- include: tasks/register.yml

# Playbooks (only at top level)
- include: intro_example.yml

Variables

MANATí

vars:
  http_port: 80

vars_files:
  - vars/main.yml

Roles

MANATí

roles:
  - geerlingguy.git

Ansible Galaxy

MANATí

Templates

MANATí

Bonus: Vagrant

MANATí

Examples

MANATí

Manati-vm

MANATí

Developer-machine

MANATí

Questions?

MANATí

Thanks!

MANATí

Ansible

By kevin porras

Ansible

Administración de la Configuración para Humanos

  • 677