SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
Ansible
Main features
● Agentless
● Secure
● Provisioning AND deployment
● Easy to start
● Data driven – more like writing configuration
file, than programming.
Terminology
● Inventory
● Facts
● Playbook
● Play
● Modules
Inventory
● Static – ini file
● Dynamic – AWS, rackspace, linode, ...
mail.example.com
smtp.example.com ansible_ssh_port=5555
[webservers]
www[01:50].example.com ansible_ssh_host=192.168.1.50
[databases]
db-[a:f].example.com ansible_ssh_user=ansible
Facts
$ ansible -m setup localhost
localhost | success >> {
"ansible_facts": {
"ansible_all_ipv4_addresses": [
"10.13.3.193",
"192.168.122.1",
"10.8.0.16"
],
"ansible_all_ipv6_addresses": [
"fe80::4eeb:42ff:fe7a:21b9",
"fe80::8cb4:6eff:fed6:5743"
],
"ansible_architecture": "x86_64",
"ansible_bios_date": "01/09/2012",
...
Playbook
# gather all facts
- include: common_scripts/gather_facts.yml
# useful includes
- include: common_scripts/common.yml
- include: common_scripts/ntp.yml
- hosts: webservers
pre_tasks:
- name: Ensure www user exists
become: yes
become_user: root
user: name=www state=present group=www-data home=/dev/null shell=/bin/false
roles:
- apache
- php
- mysql
tasks:
- name: Aditional action not in roles
authorized_keys:
user: www
key: “{{ lookup('file', inventory_dir + '/public_keys/www.pub') }}"
state: present
Modules
● “batteries included”
● 250+ modules
● Cloud services (Amazon, Rackspace, Google
Compute Platform, …)
● Packaging (apt, yum, pip, gem, ...)
● Source control (git, svn, …)
● OS stuff (service, command, file, template, ...)
Tools
● Vault (ansible-vault cmdline app)
Encrypt and deencrypt variable files.
● Galaxy (https://galaxy.ansible.com)
Web based hub with free to use roles fro
community.
● Tower
Enterprise web interface with Role based access
control, periodic jobs, logs, dashboards and
more.
Questions?
David Karban
david@karban.eu

Weitere ähnliche Inhalte

Was ist angesagt?

Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
Rayed Alrashed
 

Was ist angesagt? (20)

Configuration Management in Ansible
Configuration Management in Ansible Configuration Management in Ansible
Configuration Management in Ansible
 
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 presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
Using Ansible for Deploying to Cloud Environments
Using Ansible for Deploying to Cloud EnvironmentsUsing Ansible for Deploying to Cloud Environments
Using Ansible for Deploying to Cloud Environments
 
IT Automation with Ansible
IT Automation with AnsibleIT Automation with Ansible
IT Automation with Ansible
 
Ansible - Introduction
Ansible - IntroductionAnsible - Introduction
Ansible - Introduction
 
Introduction to ansible
Introduction to ansibleIntroduction to ansible
Introduction to ansible
 
Ansible basics workshop
Ansible basics workshopAnsible basics workshop
Ansible basics workshop
 
Ansible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / QuickstartAnsible Meetup Hamburg / Quickstart
Ansible Meetup Hamburg / Quickstart
 
Ansible - Crash course
Ansible - Crash courseAnsible - Crash course
Ansible - Crash course
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
Ansible roles done right
Ansible roles done rightAnsible roles done right
Ansible roles done right
 
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
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Network Automation: Ansible 102
Network Automation: Ansible 102Network Automation: Ansible 102
Network Automation: Ansible 102
 
Tips for a Faster Website
Tips for a Faster WebsiteTips for a Faster Website
Tips for a Faster Website
 
docker build with Ansible
docker build with Ansibledocker build with Ansible
docker build with Ansible
 
Ansible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy MykhailiutaAnsible 101, Gennadiy Mykhailiuta
Ansible 101, Gennadiy Mykhailiuta
 

Andere mochten auch

Andere mochten auch (7)

A gentle introduction to Ansible
A gentle introduction to AnsibleA gentle introduction to Ansible
A gentle introduction to Ansible
 
Ansible
AnsibleAnsible
Ansible
 
Cyansible
CyansibleCyansible
Cyansible
 
V2 and beyond
V2 and beyondV2 and beyond
V2 and beyond
 
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
AnsibleBuilding a Docker-ized Microservice  In Node, Using Ansible - AnsibleF...AnsibleBuilding a Docker-ized Microservice  In Node, Using Ansible - AnsibleF...
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricks
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 

Ähnlich wie Ansible Introduction - Ansible Brno #1 - David Karban

Ähnlich wie Ansible Introduction - Ansible Brno #1 - David Karban (20)

Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
 
Ansible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife OrchestrationAnsible - Swiss Army Knife Orchestration
Ansible - Swiss Army Knife Orchestration
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Managing Infrastructure as Code
Managing Infrastructure as CodeManaging Infrastructure as Code
Managing Infrastructure as Code
 
A tour of Ansible
A tour of AnsibleA tour of Ansible
A tour of Ansible
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
Ansible inside
Ansible insideAnsible inside
Ansible inside
 
Ansible
AnsibleAnsible
Ansible
 
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
 
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
 
3. v sphere big data extensions
3. v sphere big data extensions3. v sphere big data extensions
3. v sphere big data extensions
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Ansible with oci
Ansible with ociAnsible with oci
Ansible with oci
 
Ansible for beginners
Ansible for beginnersAnsible for beginners
Ansible for beginners
 
OSDC 2012 | Scaling with MongoDB by Ross Lawley
OSDC 2012 | Scaling with MongoDB by Ross LawleyOSDC 2012 | Scaling with MongoDB by Ross Lawley
OSDC 2012 | Scaling with MongoDB by Ross Lawley
 
Ansible - Hands on Training
Ansible - Hands on TrainingAnsible - Hands on Training
Ansible - Hands on Training
 
Ansible Tutorial.pdf
Ansible Tutorial.pdfAnsible Tutorial.pdf
Ansible Tutorial.pdf
 
Managing Your Security Logs with Elasticsearch
Managing Your Security Logs with ElasticsearchManaging Your Security Logs with Elasticsearch
Managing Your Security Logs with Elasticsearch
 
Ansible
AnsibleAnsible
Ansible
 
Ansible a tool for dev ops
Ansible a tool for dev opsAnsible a tool for dev ops
Ansible a tool for dev ops
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 

Ansible Introduction - Ansible Brno #1 - David Karban

  • 2. Main features ● Agentless ● Secure ● Provisioning AND deployment ● Easy to start ● Data driven – more like writing configuration file, than programming.
  • 3. Terminology ● Inventory ● Facts ● Playbook ● Play ● Modules
  • 4. Inventory ● Static – ini file ● Dynamic – AWS, rackspace, linode, ... mail.example.com smtp.example.com ansible_ssh_port=5555 [webservers] www[01:50].example.com ansible_ssh_host=192.168.1.50 [databases] db-[a:f].example.com ansible_ssh_user=ansible
  • 5. Facts $ ansible -m setup localhost localhost | success >> { "ansible_facts": { "ansible_all_ipv4_addresses": [ "10.13.3.193", "192.168.122.1", "10.8.0.16" ], "ansible_all_ipv6_addresses": [ "fe80::4eeb:42ff:fe7a:21b9", "fe80::8cb4:6eff:fed6:5743" ], "ansible_architecture": "x86_64", "ansible_bios_date": "01/09/2012", ...
  • 6. Playbook # gather all facts - include: common_scripts/gather_facts.yml # useful includes - include: common_scripts/common.yml - include: common_scripts/ntp.yml - hosts: webservers pre_tasks: - name: Ensure www user exists become: yes become_user: root user: name=www state=present group=www-data home=/dev/null shell=/bin/false roles: - apache - php - mysql tasks: - name: Aditional action not in roles authorized_keys: user: www key: “{{ lookup('file', inventory_dir + '/public_keys/www.pub') }}" state: present
  • 7. Modules ● “batteries included” ● 250+ modules ● Cloud services (Amazon, Rackspace, Google Compute Platform, …) ● Packaging (apt, yum, pip, gem, ...) ● Source control (git, svn, …) ● OS stuff (service, command, file, template, ...)
  • 8. Tools ● Vault (ansible-vault cmdline app) Encrypt and deencrypt variable files. ● Galaxy (https://galaxy.ansible.com) Web based hub with free to use roles fro community. ● Tower Enterprise web interface with Role based access control, periodic jobs, logs, dashboards and more.