SlideShare a Scribd company logo
1 of 17
ANSIBLE
DSA05
@2020 copyright KalKey training
COURSE CONTENT
A. Introduction
B. Install Ansible & Environment-Setup
C. Ansible components
D. Ansible Playbooks
E. Managing Variables
F. Jinga2 Template
G. Implementing Roles
H. Implementing Ansible Vault
I. Troubleshooting Ansible
@2020 copyright KalKey training
INTRODUCTION
• What & why Ansible
• History of Ansible
• How Ansible Works
• Ansible Architecture
@2020 copyright KalKey training
WHAT IS ANSIBLE
• Ansible is an automation and orchestration tool popular for its simplicity of installation, ease of
use in what concerns the connectivity to clients, its lack of agent for ansible clients and the
multitude of skills.
• Ansible functions by connecting via SSH to the clients, so it doesn't need a special agent on the
client-side, and by pushing modules to the clients. The modules are then executed locally, on
the client-side, and the output is pushed back to the Ansible server.
• Since it uses SSH, it can very easily connect to clients using SSH-Keys, simplifying though the
whole process. Client details, like hostnames or IP addresses and SSH ports, are stored in files
called inventory files. Once you have created an inventory file and populated it, ansible can use
it.
@2020 copyright KalKey training
WHY WE USE ANSIBLE
Here are some important pros/benefits of using Ansible
• One of the most significant advantages of Ansible is that it is free to use by everyone.
• It does not need any special system administrator skills to install and use Ansible, and the official
documentation is very comprehensive.
• Its modularity regarding plugins, modules, inventories, and playbooks make Ansible the perfect
companion to orchestrate large environments.
• Ansible is very lightweight and consistent, and no constraints regarding the operating system or
underlying hardware are present.
• It is also very secure due to its agentless capabilities and due to the use of OpenSSH security
features.
• Another advantage that encourages the adoption of Ansible is its smooth learning curve determined
by the comprehensive documentation and easy to learn structure and configuration.
@2020 copyright KalKey training
HISTORY OF ANSIBLE
Here, are important land marks from the history of ansible:
• In February 2012 the Ansible project began. It was first developed by Michael DeHaan, the
creator of Cobbler and Func, Fedora Unified Network Controller.
• Initially called AnsibleWorks Inc, the company funding the ansible tool was acquired in 2015 by
RedHat and later on, along with RedHat, moved under the umbrella of IBM.
• In the present, Ansible comes included in distributions like Fedora Linux, RHEL, Centos and
Oracle Linux.
@2020 copyright KalKey training
@2020 copyright KalKey training
INSTALL ANSIBLE & ENVIRONMENT-SETUP
• Install Ansible
• Set up the Environment
@2020 copyright KalKey training
ANSIBLE INSTALLATION IN LINUX
Once you have compared and weighed your options and decided to go for Ansible, the next step is to
have it installed on your system. We will go through the steps of installation in different Linux
distributions, the most popular ones, in the next small tutorial.
Install Ansible on Centos/RedHat systems
Step 1) Install EPEL repo
[root@ansible-server ~]# sudo yum install epel-release
For Amazon Linux
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Step 2) Install ansible package
[root@ansible-server ~]# sudo yum install -y ansible
@2020 copyright KalKey training
SET UP THE ENVIRONMENT
1. Launch two EC2 instance in AWS
2. Install Ansible in one machine , so that this system will act as a control node and the other one as a
managed node.
3. Configure password less ssh in both machine so that control node can connect with managed node .
4. configure ansible configuration files under /etc/ansible
5. create inventory file
Now you can go ahead……
@2020 copyright KalKey training
ANSIBLE COMPONENTS
• Ansible Inventory
• Ansible configuration File
• Ansible Ad Hoc Commands
@2020 copyright KalKey training
ANSIBLE INVENTORY
Ansible Inventory Files are simple text files which describes your
Servers .
Location of inventory file is /etc/ansible/hosts [deault]
You can make your own inventory file and it can be defined in ansible configuration file .
Some syntax of defining the servers in Inventory Files.
[mongo_master]
168.197.1.14
[mongo_slaves]
168.197.1.15
168.197.1.16
168.197.1.17
[www]
168.197.1.2
@2020 copyright KalKey training
ANSIBLE CONFIGURATION
FILE
• Ansible configuration file is located in
/etc/ansible/ansible.cfg
• You can define your custom parameter
inside the configuration file
@2020 copyright KalKey training
ANSIBLE AD-HOC COMMANDS
• One of the simplest ways Ansible can be used is by using ad-hoc commands. These can be used
when you want to issue some commands on a server or a bunch of servers. Ad-hoc commands
are not stored for future uses but represent a fast way to interact with the desired servers.
• For this tutorial, a simple two servers hosts file will be configured, containing control host and
managed host.
• You can make sure that the managed is accessible from the ansible server (control) by issuing a
ping command.
ansible all –m ping
@2020 copyright KalKey training
@2020 copyright KalKey training
@2020 copyright KalKey training
@2020 copyright KalKey training

More Related Content

What's hot

DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarCodefresh
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna KumarCodeOps Technologies LLP
 
Red hat ansible automation technical deck
Red hat ansible automation technical deckRed hat ansible automation technical deck
Red hat ansible automation technical deckJuraj Hantak
 
Cd with Github Travis CI and Heroku
Cd with Github Travis CI and HerokuCd with Github Travis CI and Heroku
Cd with Github Travis CI and HerokuJadson Santos
 
Eclipse + Maven + OSGi has never been so easy - Atllia Kiss
Eclipse + Maven + OSGi has never been so easy - Atllia KissEclipse + Maven + OSGi has never been so easy - Atllia Kiss
Eclipse + Maven + OSGi has never been so easy - Atllia Kissmfrancis
 
Jenkins and AWS DevOps Tools
Jenkins and AWS DevOps ToolsJenkins and AWS DevOps Tools
Jenkins and AWS DevOps ToolsJimmy Ray
 
Azure Kubernetes Service - benefits and challenges
Azure Kubernetes Service - benefits and challengesAzure Kubernetes Service - benefits and challenges
Azure Kubernetes Service - benefits and challengesWojciech Barczyński
 
Pipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSPipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSJimmy Ray
 
Nginx conference 2015
Nginx conference 2015Nginx conference 2015
Nginx conference 2015ING-IT
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWSAndrew Heifetz
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWSAnton Babenko
 
Packer, Terraform, Ansible avec Azure
Packer, Terraform, Ansible avec AzurePacker, Terraform, Ansible avec Azure
Packer, Terraform, Ansible avec AzureAZUG FR
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmDavid Currie
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDAleksandr Maklakov
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...CodeOps Technologies LLP
 
Modernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise EditionModernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise EditionElton Stoneman
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to CloudJay Barker
 
From 0 to 60 with kubernetes and istio
From 0 to 60 with kubernetes and istioFrom 0 to 60 with kubernetes and istio
From 0 to 60 with kubernetes and istioJoonathan Mägi
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with DockerElton Stoneman
 
Serverless Pune Meetup 1
Serverless Pune Meetup 1Serverless Pune Meetup 1
Serverless Pune Meetup 1Vishal Biyani
 

What's hot (20)

DevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm WebinarDevOps with Azure, Kubernetes, and Helm Webinar
DevOps with Azure, Kubernetes, and Helm Webinar
 
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless  - Serverless Summit 2017 - Krishna KumarKubernetes for Serverless  - Serverless Summit 2017 - Krishna Kumar
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
 
Red hat ansible automation technical deck
Red hat ansible automation technical deckRed hat ansible automation technical deck
Red hat ansible automation technical deck
 
Cd with Github Travis CI and Heroku
Cd with Github Travis CI and HerokuCd with Github Travis CI and Heroku
Cd with Github Travis CI and Heroku
 
Eclipse + Maven + OSGi has never been so easy - Atllia Kiss
Eclipse + Maven + OSGi has never been so easy - Atllia KissEclipse + Maven + OSGi has never been so easy - Atllia Kiss
Eclipse + Maven + OSGi has never been so easy - Atllia Kiss
 
Jenkins and AWS DevOps Tools
Jenkins and AWS DevOps ToolsJenkins and AWS DevOps Tools
Jenkins and AWS DevOps Tools
 
Azure Kubernetes Service - benefits and challenges
Azure Kubernetes Service - benefits and challengesAzure Kubernetes Service - benefits and challenges
Azure Kubernetes Service - benefits and challenges
 
Pipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWSPipelining DevOps with Jenkins and AWS
Pipelining DevOps with Jenkins and AWS
 
Nginx conference 2015
Nginx conference 2015Nginx conference 2015
Nginx conference 2015
 
Continuous Integration with Docker on AWS
Continuous Integration with Docker on AWSContinuous Integration with Docker on AWS
Continuous Integration with Docker on AWS
 
Continuous delivery in AWS
Continuous delivery in AWSContinuous delivery in AWS
Continuous delivery in AWS
 
Packer, Terraform, Ansible avec Azure
Packer, Terraform, Ansible avec AzurePacker, Terraform, Ansible avec Azure
Packer, Terraform, Ansible avec Azure
 
Continuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and HelmContinuous Delivery to Kubernetes with Jenkins and Helm
Continuous Delivery to Kubernetes with Jenkins and Helm
 
HOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLDHOW TO DRONE.IO IN CI/CD WORLD
HOW TO DRONE.IO IN CI/CD WORLD
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
 
Modernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise EditionModernizing Traditional Apps with Docker Enterprise Edition
Modernizing Traditional Apps with Docker Enterprise Edition
 
Automation in the Small: Code to Cloud
Automation in the Small: Code to CloudAutomation in the Small: Code to Cloud
Automation in the Small: Code to Cloud
 
From 0 to 60 with kubernetes and istio
From 0 to 60 with kubernetes and istioFrom 0 to 60 with kubernetes and istio
From 0 to 60 with kubernetes and istio
 
#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker#dddsw - Modernizing .NET Apps with Docker
#dddsw - Modernizing .NET Apps with Docker
 
Serverless Pune Meetup 1
Serverless Pune Meetup 1Serverless Pune Meetup 1
Serverless Pune Meetup 1
 

Similar to Ansible day 1.ppt

DevOps with Ansible
DevOps with AnsibleDevOps with Ansible
DevOps with AnsibleSwapnil Jain
 
DevOps Training | DevOps Online Training
DevOps Training | DevOps Online TrainingDevOps Training | DevOps Online Training
DevOps Training | DevOps Online TrainingVisualpath Training
 
Infrastructure automation using awx ansible tower
Infrastructure automation using awx ansible towerInfrastructure automation using awx ansible tower
Infrastructure automation using awx ansible towerTO THE NEW Pvt. Ltd.
 
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in MelbourneAnsible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in MelbourneKen Thompson
 
Top 19 Ansible Interview Questions And Answers.pdf
Top 19 Ansible Interview Questions And Answers.pdfTop 19 Ansible Interview Questions And Answers.pdf
Top 19 Ansible Interview Questions And Answers.pdfhimanijain83
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdfNigussMehari4
 
Net Devops Overview
Net Devops OverviewNet Devops Overview
Net Devops OverviewJoel W. King
 
Top 50 Ansible Interview Questions And Answers in 2023.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdfTop 50 Ansible Interview Questions And Answers in 2023.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdfDatacademy.ai
 
UNIT-I Introduction to Ansible.pptx
UNIT-I Introduction to Ansible.pptxUNIT-I Introduction to Ansible.pptx
UNIT-I Introduction to Ansible.pptxPandiya Rajan
 
Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...
Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...
Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...Paul Durivage
 
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Aptible
 
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...SlideTeam
 
SonarQube presentation.pptx
SonarQube presentation.pptxSonarQube presentation.pptx
SonarQube presentation.pptxVranceaAdrian
 
RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIJoel W. King
 

Similar to Ansible day 1.ppt (20)

Ansible day01
Ansible day01Ansible day01
Ansible day01
 
DevOps with Ansible
DevOps with AnsibleDevOps with Ansible
DevOps with Ansible
 
DevOps Training | DevOps Online Training
DevOps Training | DevOps Online TrainingDevOps Training | DevOps Online Training
DevOps Training | DevOps Online Training
 
Infrastructure automation using awx ansible tower
Infrastructure automation using awx ansible towerInfrastructure automation using awx ansible tower
Infrastructure automation using awx ansible tower
 
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in MelbourneAnsible @ Red Hat | December 2015 Ansible Meetup in Melbourne
Ansible @ Red Hat | December 2015 Ansible Meetup in Melbourne
 
Accelerating with Ansible
Accelerating with AnsibleAccelerating with Ansible
Accelerating with Ansible
 
Ansible
Ansible Ansible
Ansible
 
Top 19 Ansible Interview Questions And Answers.pdf
Top 19 Ansible Interview Questions And Answers.pdfTop 19 Ansible Interview Questions And Answers.pdf
Top 19 Ansible Interview Questions And Answers.pdf
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Net Devops Overview
Net Devops OverviewNet Devops Overview
Net Devops Overview
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Top 50 Ansible Interview Questions And Answers in 2023.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdfTop 50 Ansible Interview Questions And Answers in 2023.pdf
Top 50 Ansible Interview Questions And Answers in 2023.pdf
 
UNIT-I Introduction to Ansible.pptx
UNIT-I Introduction to Ansible.pptxUNIT-I Introduction to Ansible.pptx
UNIT-I Introduction to Ansible.pptx
 
Ansible.pdf
Ansible.pdfAnsible.pdf
Ansible.pdf
 
Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...
Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...
Ransack, an Application Built on Ansible's API for Rackspace -- AnsibleFest N...
 
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...Introducing Gridiron Security and Compliance Management Platform and Enclave ...
Introducing Gridiron Security and Compliance Management Platform and Enclave ...
 
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...Hands On Introduction To Ansible Configuration Management With Ansible Comple...
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
 
SonarQube presentation.pptx
SonarQube presentation.pptxSonarQube presentation.pptx
SonarQube presentation.pptx
 
Automating AWS with Ansible
Automating AWS with AnsibleAutomating AWS with Ansible
Automating AWS with Ansible
 
RTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACIRTP NPUG: Ansible Intro and Integration with ACI
RTP NPUG: Ansible Intro and Integration with ACI
 

More from Gourav Varma

Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introductionGourav Varma
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
Version control git day03(amarnath dada)
Version control   git day03(amarnath dada)Version control   git day03(amarnath dada)
Version control git day03(amarnath dada)Gourav Varma
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02Gourav Varma
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01Gourav Varma
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2Gourav Varma
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linuxGourav Varma
 
Version control git day03
Version control   git day03Version control   git day03
Version control git day03Gourav Varma
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02Gourav Varma
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01Gourav Varma
 
Docker advance topic (2)
Docker advance topic (2)Docker advance topic (2)
Docker advance topic (2)Gourav Varma
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)Gourav Varma
 

More from Gourav Varma (20)

Jenkins introduction
Jenkins introductionJenkins introduction
Jenkins introduction
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Aws day 4
Aws day 4Aws day 4
Aws day 4
 
Aws day 3
Aws day 3Aws day 3
Aws day 3
 
Aws day 2
Aws day 2Aws day 2
Aws day 2
 
Ansible day 3
Ansible day 3Ansible day 3
Ansible day 3
 
Adnible day 2.ppt
Adnible day   2.pptAdnible day   2.ppt
Adnible day 2.ppt
 
Version control git day03(amarnath dada)
Version control   git day03(amarnath dada)Version control   git day03(amarnath dada)
Version control git day03(amarnath dada)
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01
 
Dev ops
Dev opsDev ops
Dev ops
 
Shell programming 2
Shell programming 2Shell programming 2
Shell programming 2
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Final terraform
Final terraformFinal terraform
Final terraform
 
Version control git day03
Version control   git day03Version control   git day03
Version control git day03
 
Version control git day02
Version control   git day02Version control   git day02
Version control git day02
 
Version control git day01
Version control   git day01Version control   git day01
Version control git day01
 
Docker advance topic (2)
Docker advance topic (2)Docker advance topic (2)
Docker advance topic (2)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 
Docker introduction (1)
Docker introduction (1)Docker introduction (1)
Docker introduction (1)
 

Recently uploaded

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Recently uploaded (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

Ansible day 1.ppt

  • 2. COURSE CONTENT A. Introduction B. Install Ansible & Environment-Setup C. Ansible components D. Ansible Playbooks E. Managing Variables F. Jinga2 Template G. Implementing Roles H. Implementing Ansible Vault I. Troubleshooting Ansible @2020 copyright KalKey training
  • 3. INTRODUCTION • What & why Ansible • History of Ansible • How Ansible Works • Ansible Architecture @2020 copyright KalKey training
  • 4. WHAT IS ANSIBLE • Ansible is an automation and orchestration tool popular for its simplicity of installation, ease of use in what concerns the connectivity to clients, its lack of agent for ansible clients and the multitude of skills. • Ansible functions by connecting via SSH to the clients, so it doesn't need a special agent on the client-side, and by pushing modules to the clients. The modules are then executed locally, on the client-side, and the output is pushed back to the Ansible server. • Since it uses SSH, it can very easily connect to clients using SSH-Keys, simplifying though the whole process. Client details, like hostnames or IP addresses and SSH ports, are stored in files called inventory files. Once you have created an inventory file and populated it, ansible can use it. @2020 copyright KalKey training
  • 5. WHY WE USE ANSIBLE Here are some important pros/benefits of using Ansible • One of the most significant advantages of Ansible is that it is free to use by everyone. • It does not need any special system administrator skills to install and use Ansible, and the official documentation is very comprehensive. • Its modularity regarding plugins, modules, inventories, and playbooks make Ansible the perfect companion to orchestrate large environments. • Ansible is very lightweight and consistent, and no constraints regarding the operating system or underlying hardware are present. • It is also very secure due to its agentless capabilities and due to the use of OpenSSH security features. • Another advantage that encourages the adoption of Ansible is its smooth learning curve determined by the comprehensive documentation and easy to learn structure and configuration. @2020 copyright KalKey training
  • 6. HISTORY OF ANSIBLE Here, are important land marks from the history of ansible: • In February 2012 the Ansible project began. It was first developed by Michael DeHaan, the creator of Cobbler and Func, Fedora Unified Network Controller. • Initially called AnsibleWorks Inc, the company funding the ansible tool was acquired in 2015 by RedHat and later on, along with RedHat, moved under the umbrella of IBM. • In the present, Ansible comes included in distributions like Fedora Linux, RHEL, Centos and Oracle Linux. @2020 copyright KalKey training
  • 8. INSTALL ANSIBLE & ENVIRONMENT-SETUP • Install Ansible • Set up the Environment @2020 copyright KalKey training
  • 9. ANSIBLE INSTALLATION IN LINUX Once you have compared and weighed your options and decided to go for Ansible, the next step is to have it installed on your system. We will go through the steps of installation in different Linux distributions, the most popular ones, in the next small tutorial. Install Ansible on Centos/RedHat systems Step 1) Install EPEL repo [root@ansible-server ~]# sudo yum install epel-release For Amazon Linux yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm Step 2) Install ansible package [root@ansible-server ~]# sudo yum install -y ansible @2020 copyright KalKey training
  • 10. SET UP THE ENVIRONMENT 1. Launch two EC2 instance in AWS 2. Install Ansible in one machine , so that this system will act as a control node and the other one as a managed node. 3. Configure password less ssh in both machine so that control node can connect with managed node . 4. configure ansible configuration files under /etc/ansible 5. create inventory file Now you can go ahead…… @2020 copyright KalKey training
  • 11. ANSIBLE COMPONENTS • Ansible Inventory • Ansible configuration File • Ansible Ad Hoc Commands @2020 copyright KalKey training
  • 12. ANSIBLE INVENTORY Ansible Inventory Files are simple text files which describes your Servers . Location of inventory file is /etc/ansible/hosts [deault] You can make your own inventory file and it can be defined in ansible configuration file . Some syntax of defining the servers in Inventory Files. [mongo_master] 168.197.1.14 [mongo_slaves] 168.197.1.15 168.197.1.16 168.197.1.17 [www] 168.197.1.2 @2020 copyright KalKey training
  • 13. ANSIBLE CONFIGURATION FILE • Ansible configuration file is located in /etc/ansible/ansible.cfg • You can define your custom parameter inside the configuration file @2020 copyright KalKey training
  • 14. ANSIBLE AD-HOC COMMANDS • One of the simplest ways Ansible can be used is by using ad-hoc commands. These can be used when you want to issue some commands on a server or a bunch of servers. Ad-hoc commands are not stored for future uses but represent a fast way to interact with the desired servers. • For this tutorial, a simple two servers hosts file will be configured, containing control host and managed host. • You can make sure that the managed is accessible from the ansible server (control) by issuing a ping command. ansible all –m ping @2020 copyright KalKey training