SlideShare a Scribd company logo
Intro to Ansible
Dharmit Shah
@dharm1t
Who am I?
➔Co-organizer of Ansible Ahmedabad & Docker Ahmedabad
➔Software Engineer @ Red Hat
➔Work on Ansible, CentOS, Docker, Vagrant, Jenkins, etc.
➔I ❤ automation
Agenda
➔What’s the problem?
➔What is Ansible?
➔How does Ansible try to solve it?
➔How is it different from tools in same domain?
➔How to install and use it?
The Problem
➔ Normally dev, staging and prod environments
➔ Numerous systems in each one of them
➔ Webserver, DB, Mail server, Application server etc.
➔ Different setup and multiple systems for each server type
➔ Security update, bug fix, add new system to environment
Introduction to ansible
What is Ansible?
➔Radically simple IT automation engine
➔Automates:
◆ cloud provisioning
◆ configuration management
◆ application deployment
◆ any many other IT needs
➔Uses no agents, so easy to deploy
Ansible style solution and difference
➔ Install Ansible on only one system
➔ SSH access to all other systems
➔ No client process running in any remote system
➔ No daemon process either!
➔ Run a command, sit back and relax
Installation
➔ pip install
➔ dnf install
➔ apt-get install
➔ yum install
ansible
Using Ansible
➔Modify /etc/ansible/hosts (aka Inventory file)
➔Put one or more remote systems in the file
➔Public SSH key must exist in authorized_keys on that
system
➔Run ansible; it’s that easy!
➔Modules for almost all OSes
➔Supports Docker, Kubernetes, AWS, Azure, Google Cloud,
OpenStack, Rackspace, VMware
➔ansible-vault to store secrets
➔Blue-Green deployment
Features
DEMO
➔ansible localhost -m setup
➔ansible do -m ping
➔ansible do -bu root -m shell -a 'yum install nginx'
➔ansible do -bu root -m yum -a 'name=docker state=installed'
➔ansible do -bu root -m service -a 'name=docker state=started'
Simple commands
Imagine doing that for every package you want to install.
Introduction to ansible
Ansible Playbooks
➔Configuration, deployment and orchestration language
➔Manage configurations and deployments of remote sys
➔Rolling updates, delegate to other host, interact with
monitoring servers and load balancers!
➔Still human readable!
Example
$ cat playbook.yml
- hosts: do
remote_user: root
tasks:
- name: Install Docker
yum: name=docker state=installed
- name: Install EPEL
yum: name=epel-release state=installed
- name: Start & Enable Docker
service: name=docker enabled=yes state=started
$ ansible-playbook playbook.yml
Thank you!

More Related Content

PPTX
Ansible in CI
PPTX
Introduction to ansible
PDF
Ansible Introduction - Ansible Brno #1 - David Karban
PDF
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
PPTX
Introduction to Ansible
PDF
Ansible Case Studies
PDF
Network Automation with Ansible
PDF
Ansible 101 - Presentation at Ansible STL Meetup
Ansible in CI
Introduction to ansible
Ansible Introduction - Ansible Brno #1 - David Karban
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Introduction to Ansible
Ansible Case Studies
Network Automation with Ansible
Ansible 101 - Presentation at Ansible STL Meetup

What's hot (20)

PDF
A quick intro to Ansible
PDF
Ansible Automation to Rule Them All
PDF
Jenkins and ansible reference
PDF
Ansible
PPTX
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
PDF
Ansible 101
PDF
How Ansible Makes Automation Easy
PDF
Ansible Intro - June 2015 / Ansible Barcelona User Group
PPTX
Ansible presentation
PDF
Ansible
PDF
Ansible + WordPress
PPTX
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
PDF
DevOps - Infrastructure as Code by Andre Marcelo-Tanner
PDF
Ansible - Hands on Training
PDF
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
PPT
Ansible presentation
PDF
IT Automation with Ansible
PDF
Ansible
PDF
Ansible Crash Course
PDF
Automation with ansible
A quick intro to Ansible
Ansible Automation to Rule Them All
Jenkins and ansible reference
Ansible
Ansible Tutorial For Beginners | What Is Ansible And How It Works? | Ansible ...
Ansible 101
How Ansible Makes Automation Easy
Ansible Intro - June 2015 / Ansible Barcelona User Group
Ansible presentation
Ansible
Ansible + WordPress
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
DevOps - Infrastructure as Code by Andre Marcelo-Tanner
Ansible - Hands on Training
DevOps in a Regulated World - aka 'Ansible, AWS, and Jenkins'
Ansible presentation
IT Automation with Ansible
Ansible
Ansible Crash Course
Automation with ansible
Ad

Viewers also liked (6)

DOCX
PDF
Ansible - Introduction
PPTX
Automated Deployments with Ansible
PPTX
Ansible: How to Get More Sleep and Require Less Coffee
PDF
Ansible tips & tricks
PDF
Ansible Introduction
Ansible - Introduction
Automated Deployments with Ansible
Ansible: How to Get More Sleep and Require Less Coffee
Ansible tips & tricks
Ansible Introduction
Ad

Similar to Introduction to ansible (20)

PPTX
Ansible as configuration management tool for devops
PDF
Automated Deployment and Configuration Engines. Ansible
PPTX
Ansible day01
PDF
Introduction to Ansible in RHEL- RHCE.pdf
PPTX
SESSION Ansible how to deploy and push resources
PDF
Ansible Tutorial.pdf
PPTX
Ansible day 1.ppt
PPTX
Ansible day 1.ppt
PDF
Ansible automation tool with modules
ODP
Introduction to Ansible
PPTX
Ansible
PPTX
Ansible_Presentation.pptx in devops 6th sem lab
PDF
Ansible is the simplest way to automate. MoldCamp, 2015
PDF
ansible_rhel.pdf
PPTX
installation and introduction to Ansible
PPTX
Intro to-ansible-sep7-meetup
PDF
#OktoCampus - Workshop : An introduction to Ansible
PPTX
Ansible: What, Why & How
PDF
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...
Ansible as configuration management tool for devops
Automated Deployment and Configuration Engines. Ansible
Ansible day01
Introduction to Ansible in RHEL- RHCE.pdf
SESSION Ansible how to deploy and push resources
Ansible Tutorial.pdf
Ansible day 1.ppt
Ansible day 1.ppt
Ansible automation tool with modules
Introduction to Ansible
Ansible
Ansible_Presentation.pptx in devops 6th sem lab
Ansible is the simplest way to automate. MoldCamp, 2015
ansible_rhel.pdf
installation and introduction to Ansible
Intro to-ansible-sep7-meetup
#OktoCampus - Workshop : An introduction to Ansible
Ansible: What, Why & How
Ansible for Configuration Management for Lohika DevOps training 2018 @ Lohika...

More from Dharmit Shah (12)

PDF
Introducing CentOS container pipeline
PDF
Introduction to Kubernetes
PDF
Introduction to Containers
PDF
Git push to build, test and scan your containers
PDF
Python in Industry
PDF
Swarm mode
PDF
Kubernetes
PDF
Atomic Developer Bundle
PDF
Docker tips & tricks
PPTX
Introducing docker
PDF
Rest apis with DRF
PDF
Docker hands-on
Introducing CentOS container pipeline
Introduction to Kubernetes
Introduction to Containers
Git push to build, test and scan your containers
Python in Industry
Swarm mode
Kubernetes
Atomic Developer Bundle
Docker tips & tricks
Introducing docker
Rest apis with DRF
Docker hands-on

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Cloud computing and distributed systems.
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPT
Teaching material agriculture food technology
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
Modernizing your data center with Dell and AMD
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Spectral efficient network and resource selection model in 5G networks
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Teaching material agriculture food technology
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
NewMind AI Weekly Chronicles - August'25 Week I
Diabetes mellitus diagnosis method based random forest with bat algorithm
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Building Integrated photovoltaic BIPV_UPV.pdf
NewMind AI Monthly Chronicles - July 2025

Introduction to ansible

  • 1. Intro to Ansible Dharmit Shah @dharm1t
  • 2. Who am I? ➔Co-organizer of Ansible Ahmedabad & Docker Ahmedabad ➔Software Engineer @ Red Hat ➔Work on Ansible, CentOS, Docker, Vagrant, Jenkins, etc. ➔I ❤ automation
  • 3. Agenda ➔What’s the problem? ➔What is Ansible? ➔How does Ansible try to solve it? ➔How is it different from tools in same domain? ➔How to install and use it?
  • 4. The Problem ➔ Normally dev, staging and prod environments ➔ Numerous systems in each one of them ➔ Webserver, DB, Mail server, Application server etc. ➔ Different setup and multiple systems for each server type ➔ Security update, bug fix, add new system to environment
  • 6. What is Ansible? ➔Radically simple IT automation engine ➔Automates: ◆ cloud provisioning ◆ configuration management ◆ application deployment ◆ any many other IT needs ➔Uses no agents, so easy to deploy
  • 7. Ansible style solution and difference ➔ Install Ansible on only one system ➔ SSH access to all other systems ➔ No client process running in any remote system ➔ No daemon process either! ➔ Run a command, sit back and relax
  • 8. Installation ➔ pip install ➔ dnf install ➔ apt-get install ➔ yum install ansible
  • 9. Using Ansible ➔Modify /etc/ansible/hosts (aka Inventory file) ➔Put one or more remote systems in the file ➔Public SSH key must exist in authorized_keys on that system ➔Run ansible; it’s that easy!
  • 10. ➔Modules for almost all OSes ➔Supports Docker, Kubernetes, AWS, Azure, Google Cloud, OpenStack, Rackspace, VMware ➔ansible-vault to store secrets ➔Blue-Green deployment Features
  • 11. DEMO
  • 12. ➔ansible localhost -m setup ➔ansible do -m ping ➔ansible do -bu root -m shell -a 'yum install nginx' ➔ansible do -bu root -m yum -a 'name=docker state=installed' ➔ansible do -bu root -m service -a 'name=docker state=started' Simple commands Imagine doing that for every package you want to install.
  • 14. Ansible Playbooks ➔Configuration, deployment and orchestration language ➔Manage configurations and deployments of remote sys ➔Rolling updates, delegate to other host, interact with monitoring servers and load balancers! ➔Still human readable!
  • 15. Example $ cat playbook.yml - hosts: do remote_user: root tasks: - name: Install Docker yum: name=docker state=installed - name: Install EPEL yum: name=epel-release state=installed - name: Start & Enable Docker service: name=docker enabled=yes state=started $ ansible-playbook playbook.yml