Ansible

ANSIBLE
Devops
Collaboration between developers and IT operations
Keep our applications running and our customers happy

What is ansible?
SIMPLE POWERFULL and AGENT LESS opensource tool .
App Deployment
Config management
Workflow Orchestration
It Automation tool
Configuaration is done using YAML

How Ansible works

Ansible tool uses no agents. It requires no additional custom security infrastructure, so it’s easy to deploy. All you need is ssh client and server:
+———————-+ +—————+
|Linuxworkstation| SSH | file_server1 |
|with Ansible | | db_server2 | Unix/Linux servers
+———————-+ Modules | proxy_server3 | in local/remote
192.168.1.100 +—————+

Why Ansible?
Simplicity and ease-of-use.
Human readable automation
Strong focus on security and reliability
Agent Less
No extra code to manage
Uses Open SSH

Ansible Concepts
Host Inventory
Playbooks
Tasks & Modules
Handlers
Roles

Host Inventory
Lists of hosts you want to manage with Ansible, Can be organized it into groups like webservers, Database servers , application servers
Can set ports or override other connections.
Uses flat files or a plugin to communicate with cloud providers like AWS EC2 or Rackspace

Playbooks
Essentially , a script of tasks to run against a set of hosts
– Play book contains Plays
– Plays contain tasks
– Tasks call Modules

Tasks and Modules
Tasks call Modules to alter some configuration on a server.
Many Modules are provided by Ansible
You can write your own modules.
Modules do everything (e.g install packages, run commands, manages services, copy and template files, mount drives etc.

Roles
Reuse of tasks
Helps keep your configuration dry
Defined File structure.

Prerequisites

OS : RHEL/CentOS/Debian/Ubuntu Linux
Python2.5 and above
Jinja2: A modern and designer friendly templating language for Python.
PyYAML: A YAML parser and emitter for the Python programming language.
parmiko: Native Python SSHv2 protocol library.
httplib2: A comprehensive HTTP client library.

0Shares

Leave a Reply

Your email address will not be published. Required fields are marked *