Top Banner
Ansible Whirlwind Tour An Introduction
11
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ansible whirlwind tour

Ansible Whirlwind TourAn Introduction

Page 2: Ansible whirlwind tour

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

Page 3: Ansible whirlwind tour

Motivation - The Devops Revolution

Page 4: Ansible whirlwind tour

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

Page 5: Ansible whirlwind tour

How Ansible Works

Main Server Remote

Page 6: Ansible whirlwind tour

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

Page 7: Ansible whirlwind tour

The Play illustration

Page 8: Ansible whirlwind tour

Ansible Inventory File

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

Page 9: Ansible whirlwind tour

Ansible Module

from ansible.module_utils.basic import *

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

Page 10: Ansible whirlwind tour

Ansible Tips

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

SSH Multiplexing

Page 11: Ansible whirlwind tour

Thank you