SlideShare a Scribd company logo
12
Most read
13
Most read
14
Most read
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

PPTX
Ansible_Automation_tools that used in devops
PPTX
Ansible.pptx
PDF
IT Automation with Ansible
PPTX
Introduction to Ansible
PPTX
Ansible as configuration management tool for devops
PDF
Ansible Tutorial.pdf
PDF
Ansible - Hands on Training
PDF
Ansible automation tool with modules
Ansible_Automation_tools that used in devops
Ansible.pptx
IT Automation with Ansible
Introduction to Ansible
Ansible as configuration management tool for devops
Ansible Tutorial.pdf
Ansible - Hands on Training
Ansible automation tool with modules

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

PPTX
Ansible day 1.ppt
PPTX
Ansible day 1.ppt
PDF
Ansible.pdf
PDF
Automation with ansible
PPTX
SESSION Ansible how to deploy and push resources
PPTX
Introduction to ansible
PPTX
Ansible
PDF
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
PDF
#OktoCampus - Workshop : An introduction to Ansible
PDF
Using ansible to manage cloud stack
PPTX
ansible : Infrastructure automation,idempotent and more
PPTX
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
PPTX
Ansible day01
PDF
Using ansible to manage cloud platform by Accelerite
PDF
Ansible windows cheat sheet by anil.k
PPTX
Managing windows Nodes like Linux Nodes by Ansible
PDF
PPTX
Ansible Hands On
PDF
Ansible_Basics_ppt.pdf
PDF
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ansible day 1.ppt
Ansible day 1.ppt
Ansible.pdf
Automation with ansible
SESSION Ansible how to deploy and push resources
Introduction to ansible
Ansible
Hands On Introduction To Ansible Configuration Management With Ansible Comple...
#OktoCampus - Workshop : An introduction to Ansible
Using ansible to manage cloud stack
ansible : Infrastructure automation,idempotent and more
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
Ansible day01
Using ansible to manage cloud platform by Accelerite
Ansible windows cheat sheet by anil.k
Managing windows Nodes like Linux Nodes by Ansible
Ansible Hands On
Ansible_Basics_ppt.pdf
Ansible is the simplest way to automate. SymfonyCafe, 2015
Ad

Recently uploaded (20)

PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PPTX
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
RMMM.pdf make it easy to upload and study
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
1_English_Language_Set_2.pdf probationary
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
What if we spent less time fighting change, and more time building what’s rig...
Chinmaya Tiranga Azadi Quiz (Class 7-8 )
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Indian roads congress 037 - 2012 Flexible pavement
Final Presentation General Medicine 03-08-2024.pptx
Orientation - ARALprogram of Deped to the Parents.pptx
Paper A Mock Exam 9_ Attempt review.pdf.
UV-Visible spectroscopy..pptx UV-Visible Spectroscopy – Electronic Transition...
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
202450812 BayCHI UCSC-SV 20250812 v17.pptx
RMMM.pdf make it easy to upload and study
History, Philosophy and sociology of education (1).pptx
Supply Chain Operations Speaking Notes -ICLT Program
medical_surgical_nursing_10th_edition_ignatavicius_TEST_BANK_pdf.pdf
A systematic review of self-coping strategies used by university students to ...
1_English_Language_Set_2.pdf probationary
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Onco Emergencies - Spinal cord compression Superior vena cava syndrome Febr...
Ad

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