SlideShare a Scribd company logo
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

More Related Content

ODP
ansible why ?
PPTX
Introduction to ansible
PPTX
Introduction to Ansible
PDF
Ansible Automation to Rule Them All
PDF
Jenkins and ansible reference
PDF
Ansible 101
PDF
A quick intro to Ansible
PDF
Network Automation with Ansible
ansible why ?
Introduction to ansible
Introduction to Ansible
Ansible Automation to Rule Them All
Jenkins and ansible reference
Ansible 101
A quick intro to Ansible
Network Automation with Ansible

What's hot (20)

PDF
Configuration Management in Ansible
PDF
Ansible is the simplest way to automate. MoldCamp, 2015
PPT
Ansible presentation
PDF
Automation with ansible
PPTX
Ansible presentation
PDF
Using Ansible for Deploying to Cloud Environments
PDF
IT Automation with Ansible
PDF
Ansible - Introduction
PPTX
Introduction to ansible
ODP
Ansible basics workshop
PDF
Ansible Meetup Hamburg / Quickstart
PPTX
Ansible - Crash course
PPTX
Best practices for ansible
PDF
Ansible roles done right
PPTX
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
ODP
Introduction to Ansible
PDF
Network Automation: Ansible 102
PPT
Tips for a Faster Website
PDF
docker build with Ansible
PPTX
Ansible 101, Gennadiy Mykhailiuta
Configuration Management in Ansible
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible presentation
Automation with ansible
Ansible presentation
Using Ansible for Deploying to Cloud Environments
IT Automation with Ansible
Ansible - Introduction
Introduction to ansible
Ansible basics workshop
Ansible Meetup Hamburg / Quickstart
Ansible - Crash course
Best practices for ansible
Ansible roles done right
Ansible Automation Best Practices From Startups to Enterprises - Minnebar 12
Introduction to Ansible
Network Automation: Ansible 102
Tips for a Faster Website
docker build with Ansible
Ansible 101, Gennadiy Mykhailiuta
Ad

Viewers also liked (7)

PDF
A gentle introduction to Ansible
PDF
Ansible
PPTX
Cyansible
PDF
V2 and beyond
PDF
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
PDF
Ansible tips & tricks
PDF
Ansible Introduction
A gentle introduction to Ansible
Ansible
Cyansible
V2 and beyond
AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleF...
Ansible tips & tricks
Ansible Introduction
Ad

Similar to Ansible Introduction - Ansible Brno #1 - David Karban (20)

PPTX
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
PDF
Ansible - Swiss Army Knife Orchestration
PDF
Automating complex infrastructures with Puppet
PDF
Managing Infrastructure as Code
PDF
A tour of Ansible
PDF
Ansible new paradigms for orchestration
PDF
Ansible inside
PPTX
Ansible
PDF
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
PDF
Ansible 101 - Presentation at Ansible STL Meetup
PPTX
3. v sphere big data extensions
PDF
Automating Complex Setups with Puppet
PDF
Ansible with oci
PPTX
Ansible for beginners
PDF
OSDC 2012 | Scaling with MongoDB by Ross Lawley
PDF
Ansible - Hands on Training
PDF
Ansible Tutorial.pdf
PPTX
Managing Your Security Logs with Elasticsearch
PDF
Ansible
PDF
Ansible a tool for dev ops
Developers’ mDay 2019. - Rastko Vasiljević, SuperAdmins – Infrastructure as c...
Ansible - Swiss Army Knife Orchestration
Automating complex infrastructures with Puppet
Managing Infrastructure as Code
A tour of Ansible
Ansible new paradigms for orchestration
Ansible inside
Ansible
How we used ruby to build locaweb's cloud (http://presentations.pothix.com/ru...
Ansible 101 - Presentation at Ansible STL Meetup
3. v sphere big data extensions
Automating Complex Setups with Puppet
Ansible with oci
Ansible for beginners
OSDC 2012 | Scaling with MongoDB by Ross Lawley
Ansible - Hands on Training
Ansible Tutorial.pdf
Managing Your Security Logs with Elasticsearch
Ansible
Ansible a tool for dev ops

Recently uploaded (20)

PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Machine learning based COVID-19 study performance prediction
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Modernizing your data center with Dell and AMD
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Approach and Philosophy of On baking technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Spectral efficient network and resource selection model in 5G networks
20250228 LYD VKU AI Blended-Learning.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Machine learning based COVID-19 study performance prediction
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
A Presentation on Artificial Intelligence
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Modernizing your data center with Dell and AMD
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Approach and Philosophy of On baking technology
Unlocking AI with Model Context Protocol (MCP)
Per capita expenditure prediction using model stacking based on satellite ima...

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.