SlideShare a Scribd company logo
1 of 22
Ansible
Hsi-Kai Wang
o Introduction
o Install
o Inventory
o Ad-Hoc/CLI
o Playbook
Outline
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY2
o What
• Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more
advanced IT tasks such as continuous deployments or zero downtime rolling updates.
o Current version
• Community: Ansible 2.2(stable), 2.3(devel)
• Enterprise: Ansible tower
o Feature
• SSH Protocol
• Agent-less (push mode)
• Idempotent
• Role defined
• DSL: YAML(yml), Jinja2(j2)
Introduction
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY3
https://www.ansible.com/
Workflow
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY4
control
playbook
managed
ad-hoc/cli
SSH
o Requirements
• Python 2.6, 2.7 for control
• Python 2.4, 2.5 for managed
o # method1: install via yum
centos:~ # yum install epel-release
centos:~ # yum install ansible
o # method2: install via pip
centos:~ # pip install ansible
Install
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY5
o Config Order
1. ANSIBLE_CONFIG environment variable
2. ./ansible.cfg
3. ~/.ansible.cfg
4. /etc/ansible/ansible.cfg
o control:~ # cat /etc/ansible/ansible.cfg
[defaults]
ansible_python_interpreter = /usr/bin/python2
nocows = 1
...
Config File
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY6
o Main command
• ansible
• ansible-playbook
• ansible-doc
o Other command
• ansible-galaxy
• ansible-pull
• ansible-console
• ansible-vault
Command
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY7
Inventory
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY8
Ref: http://docs.ansible.com/ansible/intro_inventory.html
host group
group of group
group variable
o control:~ # cat hosts
node1 ansible_ssh_host=192.168.0.11 ansible_ssh_user=root 
ansible_ssh_pass=password ansible_become_pass=password 
node2 ansible_ssh_host=192.168.0.12 ansible_ssh_user=root 
ansible_ssh_private_key_file=private_file
o # run ansible via ad-hoc
control:~ # ansible all -i hosts -m ping -vvv
control:~ # ansible node1 -i hosts -m command -a uptime
Ad-Hoc/CLI
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY9
module
host inventory
o Ansible Module
• http://docs.ansible.com/ansible/modules_by_category.html
Module
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY10
Module – setup (gather fact)
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY11
playbook content
---
- hosts: all
tasks:
- name: Hello World
shell: echo "hello world"
[
{host: "all”},
{
tasks: [
{ name: "Hello World",
shell: "echo "hello world“”}
]
}
]
YAML & JSON
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY12
Playbook - content
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY13
module
disable gather fact
Playbook - execute
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY14
Playbook - vars
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY15
Playbook - example
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY16
copy file from control to managed
loop
notify
condition
Playbook - roles
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY17
Directory Structure
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY18
Playbook - tags
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY19
Playbook - tasks
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY20
o Ansible
o Ansible Document
o Ansible: Up and Running
o 現代 IT 人一定要知道的 Ansible 自動化組態技巧
Reference
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY21
Thank you!
© 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY
@ruckuswirelessfacebook.com/ruckuswirelesswww.ruckuswireless.com
22

More Related Content

What's hot

Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleCoreStack
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karbanansiblebrno
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done rightDan Vaida
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationKumar Y
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practicesBas Meijer
 
Jenkins and ansible reference
Jenkins and ansible referenceJenkins and ansible reference
Jenkins and ansible referencelaonap166
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with AnsibleAhmed AbouZaid
 
Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2Brian Schott
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 
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
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Keith Resar
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaJuan Diego Pereiro Arean
 
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017Jumping Bean
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using dockerLarry Cai
 
Ansible for beginners
Ansible for beginnersAnsible for beginners
Ansible for beginnersKuo-Le Mei
 

What's hot (20)

Ansible best practices
Ansible best practicesAnsible best practices
Ansible best practices
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David KarbanAnsible Introduction - Ansible Brno #1 - David Karban
Ansible Introduction - Ansible Brno #1 - David Karban
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practices
 
Jenkins and ansible reference
Jenkins and ansible referenceJenkins and ansible reference
Jenkins and ansible reference
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2Using Ansible Dynamic Inventory with Amazon EC2
Using Ansible Dynamic Inventory with Amazon EC2
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
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
 
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
 
Ansible 101
Ansible 101Ansible 101
Ansible 101
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Ansible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers GaliciaAnsible introduction - XX Betabeers Galicia
Ansible introduction - XX Betabeers Galicia
 
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
DevOpsDaysCPT Ansible Infrastrucutre as Code 2017
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
 
Ansible for beginners
Ansible for beginnersAnsible for beginners
Ansible for beginners
 

Viewers also liked

Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016ManageIQ
 
Phantom app: Ansible Tower
Phantom app:  Ansible TowerPhantom app:  Ansible Tower
Phantom app: Ansible TowerJoel W. King
 
Du cycle en V à DevOps, en passant par agile - Normation
Du cycle en V à DevOps, en passant par agile - NormationDu cycle en V à DevOps, en passant par agile - Normation
Du cycle en V à DevOps, en passant par agile - NormationRUDDER
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to MavenVadym Lotar
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupGreg DeKoenigsberg
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102APNIC
 
Busque, Compare Y Si Encuentra Algo Mejor3
Busque, Compare Y Si Encuentra Algo Mejor3Busque, Compare Y Si Encuentra Algo Mejor3
Busque, Compare Y Si Encuentra Algo Mejor3guest9e6bc3
 
2016/01/04付 オリジナルiTunes週間トップソングトピックス
2016/01/04付 オリジナルiTunes週間トップソングトピックス2016/01/04付 オリジナルiTunes週間トップソングトピックス
2016/01/04付 オリジナルiTunes週間トップソングトピックスThe Natsu Style
 
Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier
Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier
Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier Audun Farbrot
 
Concorrencia geral UFPE 2014
Concorrencia geral UFPE 2014Concorrencia geral UFPE 2014
Concorrencia geral UFPE 2014Portal NE10
 
All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...
All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...
All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...Lauren Ray
 
Outsourcing de exploración en Argentina
Outsourcing de exploración en ArgentinaOutsourcing de exploración en Argentina
Outsourcing de exploración en ArgentinaPaola Rojas
 
Estructura atómica 1º
Estructura atómica 1ºEstructura atómica 1º
Estructura atómica 1ºjpache80
 
Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...
Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...
Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...MAXfocus
 
BubbleMap Application
BubbleMap ApplicationBubbleMap Application
BubbleMap ApplicationMasaya Kogawa
 
2015/09/28付 オリジナルiTunes週間トップソングトピックス
2015/09/28付 オリジナルiTunes週間トップソングトピックス2015/09/28付 オリジナルiTunes週間トップソングトピックス
2015/09/28付 オリジナルiTunes週間トップソングトピックスThe Natsu Style
 

Viewers also liked (20)

Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
Ansible Tower - Drew Bomhof, Brandon Dunne - ManageIQ Design Summit 2016
 
Phantom app: Ansible Tower
Phantom app:  Ansible TowerPhantom app:  Ansible Tower
Phantom app: Ansible Tower
 
Du cycle en V à DevOps, en passant par agile - Normation
Du cycle en V à DevOps, en passant par agile - NormationDu cycle en V à DevOps, en passant par agile - Normation
Du cycle en V à DevOps, en passant par agile - Normation
 
An Introduction to Maven
An Introduction to MavenAn Introduction to Maven
An Introduction to Maven
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102
 
Busque, Compare Y Si Encuentra Algo Mejor3
Busque, Compare Y Si Encuentra Algo Mejor3Busque, Compare Y Si Encuentra Algo Mejor3
Busque, Compare Y Si Encuentra Algo Mejor3
 
2016/01/04付 オリジナルiTunes週間トップソングトピックス
2016/01/04付 オリジナルiTunes週間トップソングトピックス2016/01/04付 オリジナルiTunes週間トップソングトピックス
2016/01/04付 オリジナルiTunes週間トップソングトピックス
 
Test
TestTest
Test
 
88L10 MARINE CERT
88L10 MARINE CERT88L10 MARINE CERT
88L10 MARINE CERT
 
Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier
Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier
Krasjkurs i twitter. Forskningskommunikasjon i sosiale medier
 
Concorrencia geral UFPE 2014
Concorrencia geral UFPE 2014Concorrencia geral UFPE 2014
Concorrencia geral UFPE 2014
 
All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...
All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...
All Tomorrow's Programs: New Modes of Librarian Engagement and Student Collab...
 
Outubro rosa 15.10
Outubro rosa 15.10Outubro rosa 15.10
Outubro rosa 15.10
 
Outsourcing de exploración en Argentina
Outsourcing de exploración en ArgentinaOutsourcing de exploración en Argentina
Outsourcing de exploración en Argentina
 
QI, not QA
QI, not QAQI, not QA
QI, not QA
 
Estructura atómica 1º
Estructura atómica 1ºEstructura atómica 1º
Estructura atómica 1º
 
Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...
Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...
Consolidating your Services Portfolio with GFI MAX - Jason Parsons and Steve ...
 
BubbleMap Application
BubbleMap ApplicationBubbleMap Application
BubbleMap Application
 
2015/09/28付 オリジナルiTunes週間トップソングトピックス
2015/09/28付 オリジナルiTunes週間トップソングトピックス2015/09/28付 オリジナルiTunes週間トップソングトピックス
2015/09/28付 オリジナルiTunes週間トップソングトピックス
 

Similar to Ansible intro

Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19dvillaco
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsRaul Leite
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonMyNOG
 
Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017Mohamad Hassan
 
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets AnsibleCloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets AnsibleBenjamin Zores
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...mfrancis
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreRod Flohr
 
How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2Fernando Lopez Aguilar
 
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE LabHow to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE LabFIWARE
 
PHP Installed on IBM i - the Nickel Tour
PHP Installed on IBM i - the Nickel TourPHP Installed on IBM i - the Nickel Tour
PHP Installed on IBM i - the Nickel TourRod Flohr
 
Lessons Learned: Using Concourse In Production
Lessons Learned: Using Concourse In ProductionLessons Learned: Using Concourse In Production
Lessons Learned: Using Concourse In ProductionShingo Omura
 
Introduction to Ansible. Meetup Infracoders
Introduction to Ansible. Meetup InfracodersIntroduction to Ansible. Meetup Infracoders
Introduction to Ansible. Meetup InfracodersJosé Manuel Molero
 
OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016
OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016
OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016ManageIQ
 
06 network automationwithansible
06 network automationwithansible06 network automationwithansible
06 network automationwithansibleKhairul Zebua
 
Snap - the universal packaging format for linux distros
Snap - the universal packaging format for linux distrosSnap - the universal packaging format for linux distros
Snap - the universal packaging format for linux distrosAnthony Wong
 

Similar to Ansible intro (20)

Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19Ansible automation sa technical deck q2 fy19
Ansible automation sa technical deck q2 fy19
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOps
 
Nagios intro
Nagios intro Nagios intro
Nagios intro
 
Ansible & Salt - Vincent Boon
Ansible & Salt - Vincent BoonAnsible & Salt - Vincent Boon
Ansible & Salt - Vincent Boon
 
Automation day red hat ansible
   Automation day red hat ansible    Automation day red hat ansible
Automation day red hat ansible
 
Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017
 
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets AnsibleCloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
CloudOpen 2014 - Extending Cloud Automation, When OpenStack Meets Ansible
 
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
Getting to the Next Level with Eclipse Concierge - Jan Rellermeyer + Tim Verb...
 
Ansible101
Ansible101Ansible101
Ansible101
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and more
 
How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2How to deploy spark instance using ansible 2.0 in fiware lab v2
How to deploy spark instance using ansible 2.0 in fiware lab v2
 
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE LabHow to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
How to Deploy Spark Instance Using Ansible 2.0 in FIWARE Lab
 
Fuel Plugins
Fuel PluginsFuel Plugins
Fuel Plugins
 
PHP Installed on IBM i - the Nickel Tour
PHP Installed on IBM i - the Nickel TourPHP Installed on IBM i - the Nickel Tour
PHP Installed on IBM i - the Nickel Tour
 
Lessons Learned: Using Concourse In Production
Lessons Learned: Using Concourse In ProductionLessons Learned: Using Concourse In Production
Lessons Learned: Using Concourse In Production
 
Introduction to Ansible. Meetup Infracoders
Introduction to Ansible. Meetup InfracodersIntroduction to Ansible. Meetup Infracoders
Introduction to Ansible. Meetup Infracoders
 
OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016
OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016
OpenNMS - Jeff Gehlbach - ManageIQ Design Summit 2016
 
06 network automationwithansible
06 network automationwithansible06 network automationwithansible
06 network automationwithansible
 
Snap - the universal packaging format for linux distros
Snap - the universal packaging format for linux distrosSnap - the universal packaging format for linux distros
Snap - the universal packaging format for linux distros
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 

Recently uploaded

Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Ansible intro

  • 2. o Introduction o Install o Inventory o Ad-Hoc/CLI o Playbook Outline © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY2
  • 3. o What • Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. o Current version • Community: Ansible 2.2(stable), 2.3(devel) • Enterprise: Ansible tower o Feature • SSH Protocol • Agent-less (push mode) • Idempotent • Role defined • DSL: YAML(yml), Jinja2(j2) Introduction © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY3 https://www.ansible.com/
  • 4. Workflow © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY4 control playbook managed ad-hoc/cli SSH
  • 5. o Requirements • Python 2.6, 2.7 for control • Python 2.4, 2.5 for managed o # method1: install via yum centos:~ # yum install epel-release centos:~ # yum install ansible o # method2: install via pip centos:~ # pip install ansible Install © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY5
  • 6. o Config Order 1. ANSIBLE_CONFIG environment variable 2. ./ansible.cfg 3. ~/.ansible.cfg 4. /etc/ansible/ansible.cfg o control:~ # cat /etc/ansible/ansible.cfg [defaults] ansible_python_interpreter = /usr/bin/python2 nocows = 1 ... Config File © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY6
  • 7. o Main command • ansible • ansible-playbook • ansible-doc o Other command • ansible-galaxy • ansible-pull • ansible-console • ansible-vault Command © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY7
  • 8. Inventory © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY8 Ref: http://docs.ansible.com/ansible/intro_inventory.html host group group of group group variable
  • 9. o control:~ # cat hosts node1 ansible_ssh_host=192.168.0.11 ansible_ssh_user=root ansible_ssh_pass=password ansible_become_pass=password node2 ansible_ssh_host=192.168.0.12 ansible_ssh_user=root ansible_ssh_private_key_file=private_file o # run ansible via ad-hoc control:~ # ansible all -i hosts -m ping -vvv control:~ # ansible node1 -i hosts -m command -a uptime Ad-Hoc/CLI © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY9 module host inventory
  • 10. o Ansible Module • http://docs.ansible.com/ansible/modules_by_category.html Module © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY10
  • 11. Module – setup (gather fact) © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY11 playbook content
  • 12. --- - hosts: all tasks: - name: Hello World shell: echo "hello world" [ {host: "all”}, { tasks: [ { name: "Hello World", shell: "echo "hello world“”} ] } ] YAML & JSON © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY12
  • 13. Playbook - content © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY13 module disable gather fact
  • 14. Playbook - execute © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY14
  • 15. Playbook - vars © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY15
  • 16. Playbook - example © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY16 copy file from control to managed loop notify condition
  • 17. Playbook - roles © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY17
  • 18. Directory Structure © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY18
  • 19. Playbook - tags © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY19
  • 20. Playbook - tasks © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY20
  • 21. o Ansible o Ansible Document o Ansible: Up and Running o 現代 IT 人一定要知道的 Ansible 自動化組態技巧 Reference © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY21
  • 22. Thank you! © 2016 BROCADE COMMUNICATIONS SYSTEMS, INC. INTERNAL USE ONLY @ruckuswirelessfacebook.com/ruckuswirelesswww.ruckuswireless.com 22