Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
26 views11 pages

Ansible

Uploaded by

mahendra bhamare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views11 pages

Ansible

Uploaded by

mahendra bhamare
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Ansible

 Ansible Introduction.
 Why do we require Ansible?
 Advantages of Using Ansible.
 Push Based Vs Pull Based.
 Ansible Architecture.
 Ansible Terms.
 Ansible Working.
 Ansible in DevOps.
 Ansible Installation.
 Ansible Ad-Hoc Commands.
 Ansible Modules & Playbooks.
 Ansible Configuration Files Writing.
Ansible
 Ansible Introduction:
 Ansible is simple open source IT engine which automates: application deployment,
intra service orchestration, cloud provisioning and many other IT tools.
 Ansible is easy to deploy because it does not use any agents or custom security inf-
rastructure.
 Ansible uses playbook to describe automation jobs, and playbook uses very simple
language i.e. YAML
 Ansible is designed for multi-tier deployment.
 Ansible uses the hosts file where one can group the hosts & can control the actions
on a specific group in the playbooks.
Ansible
 Why Do We Require Ansible:
 Ansible automates and simplifies repetitive, complex, and tedious operations.
 Ansible is open source, saves time as well as human efforts & is easy to implement.
 Ansible architecture is simple and effective, It works by connecting to your nodes & pushing
small programs to them.
 Ansible is push-based architecture & doesn’t need any agents running on the client nodes.
 Ansible works over SSH and doesn't require any daemons, special servers, or libraries to
work. A text editor and a command line tool are usually enough to get your work done.
 Ansible infrastructure is described in a text file (INI) and then all the information about the
desired state of these machines are organized in playbooks.
Ansible
 Advantages of Using Ansible:
 Agentless: It doesn’t require any additional software on your server nodes. This helps keep
the installation clean while ensuring that there are no conflicts with our software.
 Simple: Ansible uses a simple syntax written in YAML called playbooks. YAML is a human re-
adable data serialization language, doesn’t require coding skills.
 Powerful & Flexible: Ansible has powerful features that can enable you to model even the
most complex IT workflows.
 Efficient: No extra software on your servers means more resources for your applications.
 Open-Source: Ansible is one of the powerful DevOps tools which is open-source.
 Secure: Ansible uses SSH connection which is encrypted and secure.
 Ease of Use: One can configure & manage complex infrastructure solutions very easily using
Ansible.
Ansible
 Push Based Vs Pull Based:
Data Servers

Send Specifications
Orchestrate (SSH)
Web Servers

Poll For Changes


Version Control System Central Server
Application Servers

 Ansible has push-based architecture & doesn’t need any agents running on the client nodes.
 Central server pushes the configuration information on the target servers (nodes).
 You can control when the changes are implemented on the target servers.
Ansible
 Push Based Vs Pull Based:
Agent (Client) Managed Host

Send Specifications
Send Specifications
Agent (Client) Managed Host
Poll For Changes
Poll For Changes
Version Control System Central Server
Agent (Client) Managed Host

 Tools like chef & puppet are pull architecture based.


 Agents on the target servers (nodes) periodically checks for the configuration information
from the central server.
Ansible
 Ansible Architecture:
Ansible
 Ansible Terms:
 Controller Machine: The machine where Ansible is installed, responsible for running the provisioning
on the servers you are managing.
 Inventory: An initialization file that contains information about the servers you are managing.
 Playbook: The entry point for Ansible provisioning, where the automation is defined through tasks
using YAML format.
 Task: A block that defines a single procedure to be executed, e.g. Install a package.
 Module: A module typically abstracts a system task, like dealing with packages or creating and chan-
ging files. Ansible has a multitude of built-in modules, but you can also create custom ones.
 Role: A pre-defined way for organizing playbooks and other files in order to facilitate sharing and re-
using portions of a provisioning.
 Play: A provisioning executed from start to finish is called a play. In simple words, execution of a
playbook is called a play.
 Facts: Global variables containing information about the system, like network interfaces or operating
system.
 Handlers: Used to trigger service status changes, like restarting or stopping a service.
Ansible
 Ansible Working:
SSH Host 1 (Group A)
Control Server
(Management Node)

Playbook SSH

SSH
Host 2 (Group B)

Group A:
Host 1
Group B: Inventory
Host 2 Host N (Group B)
Host N
Ansible
 Ansible In DevOps:
Ansible
 Ansible In DevOps:

Continuous
PLAN CODE Integration
BUILD

Continuous
MONITORING DEPLOY TEST
Monitoring

ANSIBLE

You might also like