Ansible whirlwind tour

11
Ansible Whirlwind Tour An Introduction

Transcript of Ansible whirlwind tour

Ansible Whirlwind TourAn Introduction

whoami

Sushant SrivastavaI work at Akamai Technologies Pvt. Ltd.Platform Infrastructure EngineerOn my day job I work on Java, Python, Ruby, Perl and Shell.@ssushant on Twitter

Motivation - The Devops Revolution

Ansible Configuration management

● Easy to read syntax● Nothing to install on remote hosts● Push-based● Ansible scales down● Built-in modules● Thin layer of Abstraction

How Ansible Works

Main Server Remote

Ansible Playbook

Main orchestrationA list of PlaysEach play contains

○ A set of hosts to configure○ A list of tasks to be executed on those hosts

The Play illustration

Ansible Inventory File

The default way to describe your hostsAn ini fileHosts can be grouped into such groups as webservers, database servers etc.

Ansible Module

from ansible.module_utils.basic import *

use main() to run your script logicuse exit_json with informationuse fail_json with failure message

Ansible Tips

Ansible uses SSH by default, so SSH optimizations will come handy.

SSH Multiplexing

Thank you