SlideShare a Scribd company logo
Ansible in 40 minutes
Installation
● If you do not have ansible installed yet, please
do it now:
http://docs.ansible.com/ansible/intro_installation
.html#installing-the-control-machine
● We will need the git, too.
● It should be included on USB stick in virtual
machine.
Main features
● Agentless
● Secure
● Provisioning AND deployment
● Easy to start
● Data driven
● Idempotent
Key concepts
● Inventory
– List of managed computers, can be grouped.
– Default in /etc/ansible/hosts.
– May be dynamically generated.
● Module
– Basic work units.
– Plenty of them (hundreds) available.
– Template, copy, user, ...
– http://docs.ansible.com/ansible/list_of_all_modules.html
Key concepts (2)
● Variables
– Defined on multiple levels (host, group, inventory).
– Used for conditionals and in templates.
● Facts
– Special variables taken from server (hostname,
date and time, networking setup, …).
– ansible -m setup localhost
Key concepts (3)
● Task
– One task do one thing (usually it is module invocation).
● Play
– Set of tasks that run on group of computers.
● Playbook
– Bunch of plays in one file.
● Role
– Encapsulate set of tasks, variables, templates, files together.
Toolset
● ansible
– Can run ad-hoc commands.
● ansible-playbook
– Run a playbooks (what a coincidence!).
● ansible-galaxy
– Download roles from other ansible users.
● ansible-vault
– Can encrypt variables, protect passwords, etc.
Workshop!
● Install full HA load balanced LAMP stack with
replicated mysql.
● Time: 4 hours
● Probability I will be dragged away by force:
High
● It was tempting to see how long I`ll be able to
speak :).
Workshop!
● Install ntp server
● Time: 30 minutes
● Probability I will be dragged away by force: Low
● Maybe boring, but hey, we have to start
somewhere!
Install ntp (in playbook)
● Get playbook: git clone
https://github.com/davidkarban/devconfcz2016_
ntp_playbook.git
Install ntp (thru role)
● Install role: sudo ansible-galaxy install
davidkarban.devconfcz2016_ntp_role
Thanks!
David Karban
david@karban.eu
www.karban.eu
https://twitter.com/davidkarban
https://github.com/davidkarban/

More Related Content

What's hot (20)

PDF
Jenkins and ansible reference
laonap166
 
PDF
Automation with ansible
Khizer Naeem
 
PDF
IT Automation with Ansible
Rayed Alrashed
 
PPTX
Using Ansible Dynamic Inventory with Amazon EC2
Brian Schott
 
PPTX
Introduction to ansible
Omid Vahdaty
 
PDF
Network Automation with Ansible
Anas
 
PDF
Ansible roles done right
Dan Vaida
 
PDF
Configuration Management in Ansible
Bangladesh Network Operators Group
 
PDF
A quick intro to Ansible
Dan Vaida
 
PPTX
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Keith Resar
 
PDF
Infrastructure = Code
Georg Sorst
 
PDF
Ansible - Swiss Army Knife Orchestration
bcoca
 
PPTX
Ansible presentation
Arthur Freyman
 
PDF
Ansible Introduction - Ansible Brno #1 - David Karban
ansiblebrno
 
ODP
ansible why ?
Yashar Esmaildokht
 
PDF
Getting Started with Ansible
Ahmed AbouZaid
 
PPTX
Ansible - Crash course
Simone Soldateschi
 
PDF
Ansible - Introduction
Stephane Manciot
 
PDF
Ansible Meetup Hamburg / Quickstart
Henry Stamerjohann
 
Jenkins and ansible reference
laonap166
 
Automation with ansible
Khizer Naeem
 
IT Automation with Ansible
Rayed Alrashed
 
Using Ansible Dynamic Inventory with Amazon EC2
Brian Schott
 
Introduction to ansible
Omid Vahdaty
 
Network Automation with Ansible
Anas
 
Ansible roles done right
Dan Vaida
 
Configuration Management in Ansible
Bangladesh Network Operators Group
 
A quick intro to Ansible
Dan Vaida
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Keith Resar
 
Infrastructure = Code
Georg Sorst
 
Ansible - Swiss Army Knife Orchestration
bcoca
 
Ansible presentation
Arthur Freyman
 
Ansible Introduction - Ansible Brno #1 - David Karban
ansiblebrno
 
ansible why ?
Yashar Esmaildokht
 
Getting Started with Ansible
Ahmed AbouZaid
 
Ansible - Crash course
Simone Soldateschi
 
Ansible - Introduction
Stephane Manciot
 
Ansible Meetup Hamburg / Quickstart
Henry Stamerjohann
 

Similar to Ansible basics workshop (20)

ODP
Ansible + Amazon AWS talk installfest.cz 2016
David Karban
 
PPTX
SESSION Ansible how to deploy and push resources
Saravanan68713
 
PDF
PLNOG14: Automation at Brainly - Paweł Rozlach
PROIDEA
 
PDF
PLNOG Automation@Brainly
vespian_256
 
PDF
Ansible.pdf
shaikshazil1
 
PDF
Automation@Brainly - Polish Linux Autumn 2014
vespian_256
 
PPTX
Automating with ansible (Part A)
iman darabi
 
PDF
Introduction to ansible
Mukul Malhotra
 
PPTX
ansible : Infrastructure automation,idempotent and more
Sabarinath Gnanasekar
 
PDF
Ansible - Hands on Training
Mehmet Ali Aydın
 
PDF
Ansible Tutorial.pdf
NigussMehari4
 
PDF
Automating with ansible (part a)
iman darabi
 
PDF
Managing VMware VMs with Ansible
jtyr
 
ODP
Deploy Mediawiki Using FIWARE Lab Facilities
FIWARE
 
ODP
Deploy MediaWiki usgin Fiware Lab Facilities
José Ignacio Carretero Guarde
 
PPTX
Ansible Network Automation session1
Dhruv Sharma
 
PDF
High Available Drupal
Bram Vogelaar
 
PDF
Ansible_Basics_ppt.pdf
PrabhjotSingh976002
 
PDF
My "Perfect" Toolchain Setup for Grails Projects
GR8Conf
 
PPTX
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
nareshmaranp
 
Ansible + Amazon AWS talk installfest.cz 2016
David Karban
 
SESSION Ansible how to deploy and push resources
Saravanan68713
 
PLNOG14: Automation at Brainly - Paweł Rozlach
PROIDEA
 
PLNOG Automation@Brainly
vespian_256
 
Ansible.pdf
shaikshazil1
 
Automation@Brainly - Polish Linux Autumn 2014
vespian_256
 
Automating with ansible (Part A)
iman darabi
 
Introduction to ansible
Mukul Malhotra
 
ansible : Infrastructure automation,idempotent and more
Sabarinath Gnanasekar
 
Ansible - Hands on Training
Mehmet Ali Aydın
 
Ansible Tutorial.pdf
NigussMehari4
 
Automating with ansible (part a)
iman darabi
 
Managing VMware VMs with Ansible
jtyr
 
Deploy Mediawiki Using FIWARE Lab Facilities
FIWARE
 
Deploy MediaWiki usgin Fiware Lab Facilities
José Ignacio Carretero Guarde
 
Ansible Network Automation session1
Dhruv Sharma
 
High Available Drupal
Bram Vogelaar
 
Ansible_Basics_ppt.pdf
PrabhjotSingh976002
 
My "Perfect" Toolchain Setup for Grails Projects
GR8Conf
 
Mastering_Ansible_PAnsible_Presentation our score increases as you pick a
nareshmaranp
 
Ad

Recently uploaded (20)

PDF
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
PPTX
L1A Season 1 Guide made by A hegy Eng Grammar fixed
toszolder91
 
PDF
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
PPTX
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
PPTX
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
PPTX
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
PPTX
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
PPTX
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
DOCX
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
PPTX
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
PPT
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
PPTX
Orchestrating things in Angular application
Peter Abraham
 
PPTX
internet básico presentacion es una red global
70965857
 
PDF
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
PDF
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
PPTX
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
PPTX
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
PDF
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
PDF
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
PPTX
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
BRKACI-1003 ACI Brownfield Migration - Real World Experiences and Best Practi...
fcesargonca
 
L1A Season 1 Guide made by A hegy Eng Grammar fixed
toszolder91
 
𝐁𝐔𝐊𝐓𝐈 𝐊𝐄𝐌𝐄𝐍𝐀𝐍𝐆𝐀𝐍 𝐊𝐈𝐏𝐄𝐑𝟒𝐃 𝐇𝐀𝐑𝐈 𝐈𝐍𝐈 𝟐𝟎𝟐𝟓
hokimamad0
 
04 Output 1 Instruments & Tools (3).pptx
GEDYIONGebre
 
PE introd.pptxfrgfgfdgfdgfgrtretrt44t444
nepmithibai2024
 
Optimization_Techniques_ML_Presentation.pptx
farispalayi
 
原版西班牙莱昂大学毕业证(León毕业证书)如何办理
Taqyea
 
法国巴黎第二大学本科毕业证{Paris 2学费发票Paris 2成绩单}办理方法
Taqyea
 
Custom vs. Off-the-Shelf Banking Software
KristenCarter35
 
sajflsajfljsdfljslfjslfsdfas;fdsfksadfjlsdflkjslgfs;lfjlsajfl;sajfasfd.pptx
theknightme
 
Agilent Optoelectronic Solutions for Mobile Application
andreashenniger2
 
Orchestrating things in Angular application
Peter Abraham
 
internet básico presentacion es una red global
70965857
 
Azure_DevOps introduction for CI/CD and Agile
henrymails
 
AI_MOD_1.pdf artificial intelligence notes
shreyarrce
 
一比一原版(SUNY-Albany毕业证)纽约州立大学奥尔巴尼分校毕业证如何办理
Taqyea
 
ONLINE BIRTH CERTIFICATE APPLICATION SYSYTEM PPT.pptx
ShyamasreeDutta
 
BRKACI-1001 - Your First 7 Days of ACI.pdf
fcesargonca
 
The-Hidden-Dangers-of-Skipping-Penetration-Testing.pdf.pdf
naksh4thra
 
L1A Season 1 ENGLISH made by A hegy fixed
toszolder91
 
Ad

Ansible basics workshop

  • 1. Ansible in 40 minutes
  • 2. Installation ● If you do not have ansible installed yet, please do it now: http://docs.ansible.com/ansible/intro_installation .html#installing-the-control-machine ● We will need the git, too. ● It should be included on USB stick in virtual machine.
  • 3. Main features ● Agentless ● Secure ● Provisioning AND deployment ● Easy to start ● Data driven ● Idempotent
  • 4. Key concepts ● Inventory – List of managed computers, can be grouped. – Default in /etc/ansible/hosts. – May be dynamically generated. ● Module – Basic work units. – Plenty of them (hundreds) available. – Template, copy, user, ... – http://docs.ansible.com/ansible/list_of_all_modules.html
  • 5. Key concepts (2) ● Variables – Defined on multiple levels (host, group, inventory). – Used for conditionals and in templates. ● Facts – Special variables taken from server (hostname, date and time, networking setup, …). – ansible -m setup localhost
  • 6. Key concepts (3) ● Task – One task do one thing (usually it is module invocation). ● Play – Set of tasks that run on group of computers. ● Playbook – Bunch of plays in one file. ● Role – Encapsulate set of tasks, variables, templates, files together.
  • 7. Toolset ● ansible – Can run ad-hoc commands. ● ansible-playbook – Run a playbooks (what a coincidence!). ● ansible-galaxy – Download roles from other ansible users. ● ansible-vault – Can encrypt variables, protect passwords, etc.
  • 8. Workshop! ● Install full HA load balanced LAMP stack with replicated mysql. ● Time: 4 hours ● Probability I will be dragged away by force: High ● It was tempting to see how long I`ll be able to speak :).
  • 9. Workshop! ● Install ntp server ● Time: 30 minutes ● Probability I will be dragged away by force: Low ● Maybe boring, but hey, we have to start somewhere!
  • 10. Install ntp (in playbook) ● Get playbook: git clone https://github.com/davidkarban/devconfcz2016_ ntp_playbook.git
  • 11. Install ntp (thru role) ● Install role: sudo ansible-galaxy install davidkarban.devconfcz2016_ntp_role