SlideShare a Scribd company logo
1 of 15
Introduction to Ansible
Presented by
Frank Kuse
Introduction to Ansible
• Ansible is a radically simple IT automation platform that makes your
applications and systems easier to deploy.
• It support configuration management with examples as below.
• Configuration of servers
• Application deployment
• Continuous testing of already install application
• Provisioning
• Orchestration
• Automation of tasks
Why Automation?
• Tasks in code
• Collaboration
• Eliminate errors
• Write once
• Laziness
• Etc….
Why Ansible
• It is a free open source application
• Agent-less – No need for agent installation and management
• Phython/yaml based
• Highly flexible and configuration management of systems.
• Large number of ready to use modules for system management
• Custom modules can be added if needed
• Configuration roll-back in case of error
• Simple and human readable
• Self documenting
Ansible Architecture
Installation of Ansible
• Install packages below on the Server Machine
• sudo apt-get install python-yaml python-jinja2 python-paramiko
python-crypto python-keyczar ansible
• Install packages below on the client Machines
• sudo apt-get install python-crypto python-keyczar
Create the RSA Key Pair
• The first step is to create the key pair on the Server machine
• ssh-keygen –t rsa
• Once you have entered the Gen Key command, you will get a few more
questions:
• Enter file in which to save the key (/home/test/.ssh/id_rsa):
• Enter no password for the next prompt
• Copy the Public Key
• ssh-copy-id test@192.168.85.135
• Repeat the same process for other machines you wish to login automatically with.
• Ensure the test username has sudo access to the remote clients
Configuration of ansible
• Do the following on the Server machine
• Create the list of client machines you wish to access via this server
• vi /etc/ansible/hosts ( And enter the following lines and save file)
• [Servers]
• 192.168.85.135
• 192.168.85.136
• Run the ping command below to see if indeed you are reaching both client
nodes
• ansible -m ping all
Examples of ansible commands
• The output show ping result success as shown below
Examples of ansible commands (Cnt)
• How to run commands to fetch hard drives utilization
• ansible -m command -a 'df -h' Servers
• How to run commands to fetch system uptime
• ansible -m command -a ‘uptime' Servers
Examples of ansible commands ( Cnt)
• The full configuration environment inventory of a particular client
machine can be obtain using the command below.
• ansible -m setup 192.168.85.135 ( output as shown below)
Creating an ansible-playbook template
• Create a template to enable the installation of an NTP service with
content as shown below and file saved as ntp.yml
Understanding ansible playbook configurations
• In order to use ansible with SSH passwords you will need to install the
program below
• sudo apt-get install sshpass
• Ansible-playbook command can be executed to run the ntp.yml file as
below
• ansible-playbook -k -K ntp.yml
• The –k –K switches allow you to be able to use your ssh key and
passwordless sudo.
• Every playbook configuration begins with triple dash ( ----)
• The hosts, tasks, name, action are various instructions commands to
help automate your ntp installation process.
Understanding ansible playbook
configurations (cnt)
• The output of the ansible-playbook command as below
Ansible Documentations
• You can find more explanation in the Ansible Docs.
• Ad-hoc commands
• Inventories
• Variables
• Modules
• Playbook Roles
• Similar tools that does the same function as Ansible are as below.
• Puppet
• Chef
• Salt

More Related Content

Similar to ansible-presentation-with-documentation.pptx

REPORT_ppt
REPORT_pptREPORT_ppt
REPORT_pptRivu Das
 
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
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAlberto Molina Coballes
 
Ansible: Automation Tool
Ansible: Automation ToolAnsible: Automation Tool
Ansible: Automation ToolAakanksha Mane
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Michael Dobe, Ph.D.
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Alex S
 
Kubernetes for HCL Connections Component Pack - Build or Buy?
Kubernetes for HCL Connections Component Pack - Build or Buy?Kubernetes for HCL Connections Component Pack - Build or Buy?
Kubernetes for HCL Connections Component Pack - Build or Buy?Martin Schmidt
 
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?panagenda
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Idan Tohami
 
Ansible on aws - Pop-up Loft Tel Aviv
Ansible on aws - Pop-up Loft Tel AvivAnsible on aws - Pop-up Loft Tel Aviv
Ansible on aws - Pop-up Loft Tel AvivAmazon Web Services
 
How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...
How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...
How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...VEXXHOST Private Cloud
 
Network automation ansible_nx-api
Network automation ansible_nx-apiNetwork automation ansible_nx-api
Network automation ansible_nx-apiJoel W. King
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Alex S
 
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet LabsTechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet LabsRobb Boyd
 

Similar to ansible-presentation-with-documentation.pptx (20)

REPORT_ppt
REPORT_pptREPORT_ppt
REPORT_ppt
 
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
 
Perforce Setup
Perforce SetupPerforce Setup
Perforce Setup
 
Infrastructure as Code
Infrastructure as CodeInfrastructure as Code
Infrastructure as Code
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Ansible: Automation Tool
Ansible: Automation ToolAnsible: Automation Tool
Ansible: Automation Tool
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)Apache Street Smarts Presentation (SANS 99)
Apache Street Smarts Presentation (SANS 99)
 
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015Ansible is the simplest way to automate. MoldCamp, 2015
Ansible is the simplest way to automate. MoldCamp, 2015
 
Kubernetes for HCL Connections Component Pack - Build or Buy?
Kubernetes for HCL Connections Component Pack - Build or Buy?Kubernetes for HCL Connections Component Pack - Build or Buy?
Kubernetes for HCL Connections Component Pack - Build or Buy?
 
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
Engage 2020 - Kubernetes for HCL Connections Component Pack - Build or Buy?
 
Automation in Cloud
Automation in CloudAutomation in Cloud
Automation in Cloud
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
 
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.Ansible 2.0 - How to use Ansible to automate your applications in AWS.
Ansible 2.0 - How to use Ansible to automate your applications in AWS.
 
Ansible on aws - Pop-up Loft Tel Aviv
Ansible on aws - Pop-up Loft Tel AvivAnsible on aws - Pop-up Loft Tel Aviv
Ansible on aws - Pop-up Loft Tel Aviv
 
infinio2
infinio2infinio2
infinio2
 
How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...
How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...
How To Setup Highly Available Web Servers with Keepalived & Floating IPs on U...
 
Network automation ansible_nx-api
Network automation ansible_nx-apiNetwork automation ansible_nx-api
Network automation ansible_nx-api
 
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible is the simplest way to automate. SymfonyCafe, 2015
 
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet LabsTechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
TechWiseTV Workshop: Open NX-OS and Devops with Puppet Labs
 

Recently uploaded

IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
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
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
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
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 

Recently uploaded (20)

IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
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 ...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
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
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
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"
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
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
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
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
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 

ansible-presentation-with-documentation.pptx

  • 2. Introduction to Ansible • Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy. • It support configuration management with examples as below. • Configuration of servers • Application deployment • Continuous testing of already install application • Provisioning • Orchestration • Automation of tasks
  • 3. Why Automation? • Tasks in code • Collaboration • Eliminate errors • Write once • Laziness • Etc….
  • 4. Why Ansible • It is a free open source application • Agent-less – No need for agent installation and management • Phython/yaml based • Highly flexible and configuration management of systems. • Large number of ready to use modules for system management • Custom modules can be added if needed • Configuration roll-back in case of error • Simple and human readable • Self documenting
  • 6. Installation of Ansible • Install packages below on the Server Machine • sudo apt-get install python-yaml python-jinja2 python-paramiko python-crypto python-keyczar ansible • Install packages below on the client Machines • sudo apt-get install python-crypto python-keyczar
  • 7. Create the RSA Key Pair • The first step is to create the key pair on the Server machine • ssh-keygen –t rsa • Once you have entered the Gen Key command, you will get a few more questions: • Enter file in which to save the key (/home/test/.ssh/id_rsa): • Enter no password for the next prompt • Copy the Public Key • ssh-copy-id test@192.168.85.135 • Repeat the same process for other machines you wish to login automatically with. • Ensure the test username has sudo access to the remote clients
  • 8. Configuration of ansible • Do the following on the Server machine • Create the list of client machines you wish to access via this server • vi /etc/ansible/hosts ( And enter the following lines and save file) • [Servers] • 192.168.85.135 • 192.168.85.136 • Run the ping command below to see if indeed you are reaching both client nodes • ansible -m ping all
  • 9. Examples of ansible commands • The output show ping result success as shown below
  • 10. Examples of ansible commands (Cnt) • How to run commands to fetch hard drives utilization • ansible -m command -a 'df -h' Servers • How to run commands to fetch system uptime • ansible -m command -a ‘uptime' Servers
  • 11. Examples of ansible commands ( Cnt) • The full configuration environment inventory of a particular client machine can be obtain using the command below. • ansible -m setup 192.168.85.135 ( output as shown below)
  • 12. Creating an ansible-playbook template • Create a template to enable the installation of an NTP service with content as shown below and file saved as ntp.yml
  • 13. Understanding ansible playbook configurations • In order to use ansible with SSH passwords you will need to install the program below • sudo apt-get install sshpass • Ansible-playbook command can be executed to run the ntp.yml file as below • ansible-playbook -k -K ntp.yml • The –k –K switches allow you to be able to use your ssh key and passwordless sudo. • Every playbook configuration begins with triple dash ( ----) • The hosts, tasks, name, action are various instructions commands to help automate your ntp installation process.
  • 14. Understanding ansible playbook configurations (cnt) • The output of the ansible-playbook command as below
  • 15. Ansible Documentations • You can find more explanation in the Ansible Docs. • Ad-hoc commands • Inventories • Variables • Modules • Playbook Roles • Similar tools that does the same function as Ansible are as below. • Puppet • Chef • Salt