SlideShare a Scribd company logo
1 of 14
Dynamic Inventory
Playbook
Roles
Tasks
Vars
Modules
Templates
 Ansible Vault
 Flexibility with ansible
 Demo of Spawning AWS EC2 instances
 Where we add and remove the host information very frequently then
keeping inventory always up-to-date become a little bit problematic
 In such case dynamic inventory comes into picture.
 Generally dynamic inventory written in scripts(python/shell)
 Dynamic inventory got benefits over static inventories.
 Reduce human error, as information is collected by scripts.
 Very less manual efforts for managing the inventories
 Ansible have inventory collection scripts for the below platforms
 AWS EC2 External Inventory Scripts, OpenStack, Google
 Example:
 ansible -i dynamic-inventory-ec.py -u ubuntu tag_Name_webserver1 –
m ping
Roles are ways of automatically loading certain
vars_files, tasks, and handlers based on a known file
structure.
Grouping content by roles also allows easy sharing of
roles with other users.
Using ansible-galaxy init will generate us a
standardised directory structure for our Role.
Variable enables more flexibility in playbooks and
roles
Variable can be used to loop through a set of given
values, access various information like the hostname
of a system and replace certain strings in templates
by system specific values
Ex:
Vault is a feature of ansible that allows keeping
sensitive data such as passwords or keys in encrypted
files, rather than as plaintext in your playbooks or
roles
These vault files can then be distributed or placed in
source control
To create a new encrypted data file, run the following
command
Example :
ansible-vault create foo.yml
 To edit an encrypted file in place, use the below command
 ansible-vault edit
 Should you wish to change your password on a vault-encrypted file or files,
you can do so with the rekey command
 ansible-vault rekey foo.yml foo1.yml
 If you have existing files that you wish to encrypt, use the below command
 ansible-vault encrypt command
 To run a playbook that contains vault-encrypted data files, you must pass
vault password
 ansible-playbook playbook.yml --ask-vault-pass
ansible-playbook playbook.yml --syntax-check
 Check for bad syntax
 Running a playbook in dry-run mode
ansible-playbook playbook.yml --check
 List all tasks in the playbook
ansible-playbook playbook.yml --list-tasks
 List the tags in the playbook
ansible-playbook playbook.yml --list-tags
 Skip the tags associated with specific tasks
ansible-playbook playbook.yml --skip-tags tag1,tag2
 Start the play from particular task
ansible-playbook playbook.yml --start-at-task=taskname
 Lets play with the playbooks
REQUIREMENTS :
Boto is a Python library that provides you with an
easy way to interact with and automate using various
Amazon Web Services
How to install Boto: Installing boto is very
straightforward, assuming your using an OS
with pip installed. If you do not currently have pip,
then do that first pip install boto
Python 2.5
Spawning AWS EC2 instances.
Ansible Dynamic Inventory, Roles, Vault and EC2 Demo
Ansible Dynamic Inventory, Roles, Vault and EC2 Demo

More Related Content

What's hot

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
 
Introduction to ansible galaxy
Introduction to ansible galaxyIntroduction to ansible galaxy
Introduction to ansible galaxyIvan Serdyuk
 
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
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with AnsibleRayed Alrashed
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestrationbcoca
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansiblefmaccioni
 
Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016Alan Lok
 
#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
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Richard Donkin
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansibleDharmit Shah
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = CodeGeorg Sorst
 
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
 
Continuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsContinuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsJeff Geerling
 
Ansible windows cheat sheet by anil.k
Ansible windows cheat sheet by anil.kAnsible windows cheat sheet by anil.k
Ansible windows cheat sheet by anil.kanilvm09
 

What's hot (20)

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
 
Introducing Ansible
Introducing AnsibleIntroducing Ansible
Introducing Ansible
 
Introduction to ansible galaxy
Introduction to ansible galaxyIntroduction to ansible galaxy
Introduction to ansible galaxy
 
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
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
 
Managing Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with AnsibleManaging Your Cisco Datacenter Network with Ansible
Managing Your Cisco Datacenter Network with Ansible
 
Ansible and AWS
Ansible and AWSAnsible and AWS
Ansible and AWS
 
Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016Ansible + WordPress - WordCamp Toronto 2016
Ansible + WordPress - WordCamp Toronto 2016
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)Go Faster with Ansible (AWS meetup)
Go Faster with Ansible (AWS meetup)
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Infrastructure = Code
Infrastructure = CodeInfrastructure = Code
Infrastructure = Code
 
Ansible best practices
Ansible best practicesAnsible best practices
Ansible best practices
 
Cyansible
CyansibleCyansible
Cyansible
 
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
 
Ansible testing
Ansible   testingAnsible   testing
Ansible testing
 
Continuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub ActionsContinuous Testing with Molecule, Ansible, and GitHub Actions
Continuous Testing with Molecule, Ansible, and GitHub Actions
 
Ansible intro
Ansible introAnsible intro
Ansible intro
 
Ansible windows cheat sheet by anil.k
Ansible windows cheat sheet by anil.kAnsible windows cheat sheet by anil.k
Ansible windows cheat sheet by anil.k
 

Similar to Ansible Dynamic Inventory, Roles, Vault and EC2 Demo

Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practicesBas Meijer
 
ansible : Infrastructure automation,idempotent and more
ansible : Infrastructure automation,idempotent and moreansible : Infrastructure automation,idempotent and more
ansible : Infrastructure automation,idempotent and moreSabarinath Gnanasekar
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done rightDan Vaida
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with AnsibleIvan Serdyuk
 
Introduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganIntroduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganCorkOpenTech
 
Ansible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL MeetupAnsible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL MeetupJeff Geerling
 
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​Ramit Surana
 
Webinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and moreWebinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and morepanagenda
 
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
 
Managing sensitive data with Ansible vault
Managing sensitive data with Ansible vaultManaging sensitive data with Ansible vault
Managing sensitive data with Ansible vaultPascal Stauffer
 
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
 
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
 
UNM Tech Day 2018 - Ansible: 
Server and Network Device Automation
UNM Tech Day 2018 - Ansible: 
Server and Network Device AutomationUNM Tech Day 2018 - Ansible: 
Server and Network Device Automation
UNM Tech Day 2018 - Ansible: 
Server and Network Device AutomationKlaus Mueller
 
Automating with ansible (Part A)
Automating with ansible (Part A)Automating with ansible (Part A)
Automating with ansible (Part A)iman darabi
 

Similar to Ansible Dynamic Inventory, Roles, Vault and EC2 Demo (20)

Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practices
 
ansible : Infrastructure automation,idempotent and more
ansible : Infrastructure automation,idempotent and moreansible : Infrastructure automation,idempotent and more
ansible : Infrastructure automation,idempotent and more
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
Introduction to Ansible - Peter Halligan
Introduction to Ansible - Peter HalliganIntroduction to Ansible - Peter Halligan
Introduction to Ansible - Peter Halligan
 
Ansible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL MeetupAnsible 101 - Presentation at Ansible STL Meetup
Ansible 101 - Presentation at Ansible STL Meetup
 
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
DEPLOYING WORDPRESS BLOG USING DOCKER COMPOSE & ANSIBLE ON AWS​
 
Webinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and moreWebinar: Automate IBM Connections Installations and more
Webinar: Automate IBM Connections Installations and more
 
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
 
playbooks.pptx
playbooks.pptxplaybooks.pptx
playbooks.pptx
 
Installing AtoM with Ansible
Installing AtoM with AnsibleInstalling AtoM with Ansible
Installing AtoM with Ansible
 
Managing sensitive data with Ansible vault
Managing sensitive data with Ansible vaultManaging sensitive data with Ansible vault
Managing sensitive data with Ansible vault
 
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
 
Ansible
AnsibleAnsible
Ansible
 
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.
 
UNM Tech Day 2018 - Ansible: 
Server and Network Device Automation
UNM Tech Day 2018 - Ansible: 
Server and Network Device AutomationUNM Tech Day 2018 - Ansible: 
Server and Network Device Automation
UNM Tech Day 2018 - Ansible: 
Server and Network Device Automation
 
Automating with ansible (Part A)
Automating with ansible (Part A)Automating with ansible (Part A)
Automating with ansible (Part A)
 
Ansible_Basics_ppt.pdf
Ansible_Basics_ppt.pdfAnsible_Basics_ppt.pdf
Ansible_Basics_ppt.pdf
 

Recently uploaded

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 

Recently uploaded (20)

Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 

Ansible Dynamic Inventory, Roles, Vault and EC2 Demo

  • 1. Dynamic Inventory Playbook Roles Tasks Vars Modules Templates  Ansible Vault  Flexibility with ansible  Demo of Spawning AWS EC2 instances
  • 2.  Where we add and remove the host information very frequently then keeping inventory always up-to-date become a little bit problematic  In such case dynamic inventory comes into picture.  Generally dynamic inventory written in scripts(python/shell)  Dynamic inventory got benefits over static inventories.  Reduce human error, as information is collected by scripts.  Very less manual efforts for managing the inventories  Ansible have inventory collection scripts for the below platforms  AWS EC2 External Inventory Scripts, OpenStack, Google  Example:  ansible -i dynamic-inventory-ec.py -u ubuntu tag_Name_webserver1 – m ping
  • 3. Roles are ways of automatically loading certain vars_files, tasks, and handlers based on a known file structure. Grouping content by roles also allows easy sharing of roles with other users. Using ansible-galaxy init will generate us a standardised directory structure for our Role.
  • 4.
  • 5.
  • 6. Variable enables more flexibility in playbooks and roles Variable can be used to loop through a set of given values, access various information like the hostname of a system and replace certain strings in templates by system specific values Ex:
  • 7. Vault is a feature of ansible that allows keeping sensitive data such as passwords or keys in encrypted files, rather than as plaintext in your playbooks or roles These vault files can then be distributed or placed in source control To create a new encrypted data file, run the following command Example : ansible-vault create foo.yml
  • 8.  To edit an encrypted file in place, use the below command  ansible-vault edit  Should you wish to change your password on a vault-encrypted file or files, you can do so with the rekey command  ansible-vault rekey foo.yml foo1.yml  If you have existing files that you wish to encrypt, use the below command  ansible-vault encrypt command  To run a playbook that contains vault-encrypted data files, you must pass vault password  ansible-playbook playbook.yml --ask-vault-pass
  • 9. ansible-playbook playbook.yml --syntax-check  Check for bad syntax  Running a playbook in dry-run mode ansible-playbook playbook.yml --check  List all tasks in the playbook ansible-playbook playbook.yml --list-tasks  List the tags in the playbook ansible-playbook playbook.yml --list-tags  Skip the tags associated with specific tasks ansible-playbook playbook.yml --skip-tags tag1,tag2  Start the play from particular task ansible-playbook playbook.yml --start-at-task=taskname
  • 10.
  • 11.  Lets play with the playbooks
  • 12. REQUIREMENTS : Boto is a Python library that provides you with an easy way to interact with and automate using various Amazon Web Services How to install Boto: Installing boto is very straightforward, assuming your using an OS with pip installed. If you do not currently have pip, then do that first pip install boto Python 2.5 Spawning AWS EC2 instances.

Editor's Notes

  1. Note:tasks are basically yml files
  2. Note: I will show u how vault works in demo
  3. Notes: production Arch