SlideShare una empresa de Scribd logo
1 de 66
APRICOT - Feb 28th, 2017
➔
➔
➔
➔
➔
https://git.io/vZKZH
➔
➔
➔
location: sfo
location:
- sfo
- sgn
sites:
- location: sfo
type: customer
- location: sgn
type: backbone
{{ location }}
{{ item }}
{{ item.location }}
{{ item.x.location }}
➔
ansible-playbook -i inventory playbook.yml
➔
● hosts
● host_vars
● group_vars
➔
inventory
➔ /etc/ansible/hosts
● Hard to manage across systems
● Usually need to be root to edit
● Can’t easily keep in revision control
➔ ./inventory/hosts
● Easily manage in revision control
● No root needed!
● Ensure everyone is using correct hosts
hosts
[all-routers:children]
customer-routers
peering-routers
[customer-routers]
car01.sgn01 ansible_host=192.0.2.20 model=mx104
car01.hkg01 ansible_host=192.0.2.21 model=mx104
[peering-routers]
pat01.lax01 ansible_host=192.0.3.40 model=asr1k
pat01.tyo01 ansible_host=192.0.3.41 model=ask9k
[websites]
bronwynlewis.com
hosts
% tree
├ ansible
│ ├── inventory
│ │ ├── group_vars
│ │ │ ├── all.yml
│ │ │ ├── development.yml
│ │ │ └── production.yml
│ │ ├── hosts
│ │ └── host_vars
│ │ ├── jumphost.yml
│ │ └── mail.yml
│ ├── playbook.yml
│ └── roles
hosts & [host|group]_vars
% cat inventory/hosts
[production:children]
admin
website
[admin]
mail
jumphost
[website]
web1
web2
db1
➔
➔ host_vars/mail.yml
● Variables to be used by the mail host
➔ host_vars/jumphost.yml
● Variables to be used by the jumphost host
host_vars
% cat inventory/hosts (before)
[customer-routers]
car01.sgn01 ansible_host=192.0.2.20 model=mx104
% cat inventory/host_vars/car01.sgn01.yml
---
ansible_host: 192.0.2.20
model: mx104
location: sgn
% cat inventory/hosts (after)
[customer-routers]
car01.sgn01
host_vars
➔
➔ group_vars/production.yml
● Vars to be used by any host in production group
➔ group_vars/all.yml
● Contains vars to be used by ALL hosts
group_vars
ansible all -i localhost, -m setup --connection=local
[...]
"ansible_distribution": "Ubuntu",
"ansible_distribution_major_version": "16",
"ansible_distribution_release": "xenial",
"ansible_distribution_version": "16.04",
"ansible_dns": {
"nameservers": [
"8.8.8.8",
"4.2.2.2"
]
},
[...]
% sudo -H pip install passlib
% sudo -H ansible-galaxy install Juniper.junos
% ansible-playbook -i bordergw01.hkg.domain.tld, test.yml
---
- name: Sample play
hosts: bordergw01.hkg.domain.tld
roles:
- Juniper.junos
gather_facts: no
connection: local
vars:
ansible_user: matt
vars_prompt:
name: passwd
prompt: JunOS password
private: yes
tasks:
- name: Collect JunOS facts
junos_get_facts:
host={{ inventory_hostname }}
user={{ ansible_user }}
passwd={{ passwd }}
register: junos
- name: Dump JunOS facts to stdout
debug: msg="{{ junos.facts }}"
% ansible-playbook -i bordergw01.hkg.domain.tld, test.yml
JunOS password:
PLAY [Sample play] **************************************
TASK [Collect JunOS facts] ******************************
TASK [Dump JunOS facts to stdout] ***********************
ok: [bordergw01.hkg.domain.tld] => {
"msg": {
[...]
"hostname": "bordergw01.hkg.domain.tld",
"ifd_style": "CLASSIC",
"master": "RE0",
"model": "MX104",
"personality": "MX",
"serialnumber": "H7931",
"switch_style": "BRIDGE_DOMAIN",
"vc_capable": false,
"version": "13.3R6.5",
"version_RE0": "13.3R6.5",
[...]
➔
● ipaddr filter is a great example
● Perform regex, perform math, etc. against vars
➔
● Can be direct variables
● Can be variables pulled in
{{ foo | default(‘bar’) }}
{{ foo | mandatory }}
mandatory
TASK [hello : Generate "hello"] ***********************************
failed: [localhost] (item={u'name': u'world', u'number': 1}) =>
{"failed": true, "item": {"name": "world", "number": 1}, "msg":
"AnsibleFilterError: Mandatory variable not defined."}
{{ foo | mandatory }}
{{ “hkg.foo.com” | regex_replace('^(.*).(w.*)$', '2') | upper }}
{{ “198.168.0.123/24”|ipaddr('address')|splitext| 
last|regex_replace('^[.]','') }}
{{ item.ipv4 | ipaddr(‘network’) }}
ipaddr(‘address’) 192.0.2.5
ipaddr(‘network’) 192.0.2.0
ipaddr(‘netmask’) 255.255.255.0
ipaddr(‘broadcast’) 192.0.2.255
ipaddr(‘net’) 203.0.113.0/24
ipaddr(‘net’)|ipaddr(‘1’) 203.0.113.1/24
ipaddr(‘net’)|ipaddr(‘1’)|ipaddr(‘address’)
203.0.113.1
‘266.1.2.888/24’ | ipaddr(‘net’) False
‘192.168.0.3/24’ | ipaddr(‘net’) True
% ansible all -i localhost, -m debug -a 
"msg={{'203.0.113.0/24'|ipaddr('net')|ipaddr('-1')|ipaddr('address')}}"
localhost | SUCCESS => {
"msg": "203.0.113.255"
}
% ansible all -i localhost, -m debug -a
"msg={{'266.1.2.3/24'|ipaddr('net')}}"
localhost | SUCCESS => {
"msg": false
}
% ansible all -i localhost, -m debug -a 
"msg={{'2001:db8::/32'|ipaddr('net')|ipaddr('2')}}"
localhost | SUCCESS => {
"msg": "2001:db8::2/32"
{{ item.ipv4 | ipaddr(‘network’) }}
{% set network = item.ipv4 | ipaddr('network') %}
{{ network }}
% cat templates/dns.j2
{% set dnsservers = [‘192.168.1.2’, ‘172.16.100.4’] %}
{% for nameserver in dnsservers %}
ip name-server {{ nameserver }}
{% endfor %}
% cat output
ip name-server 192.168.1.2
ip name-server 172.16.100.4
➔
➔
➔
{% if dhcp is True %}
{% include dhcp.j2 %}
{% endif %}
service dhcp
ip dhcp pool {{ item.hostname | upper }}
[...]
{% if dhcp is True %}
{% include dhcp.j2 %}
{% endif %}
dhcp: True
➔
➔
➔
- users:
- first_name: david
last_name: bowie
team: accounting
- first_name: grace
last_name: jones
team: engineering
{% for x in users %}
{{ x.first_name | title }}, {{ x.team | title }}
{% endfor %}
% cat output
David, Accounting
Grace, Engineering
{% set macros = {
"DNS-SERVERS": "system name-server <*>",
"NTP-SERVERS": "system ntp server <*>"
"SNMP-MANAGERS": "snmp community <*> clients <*>",
%}
{% for key, value in macros.iteritems() %}
<prefix-list>
<name>{{ key }}</name>
<apply-path>{{ value|escape }}</apply-path>
</prefix-list>
{% endfor %}
<prefix-list>
<name>DNS-SERVERS</name>
<apply-path>system name-server &lt;*&gt;</apply-path>
</prefix-list>
<prefix-list>
<name>NTP-SERVERS</name>
<apply-path>system ntp server &lt;*&gt;</apply-path>
</prefix-list>
<prefix-list>
<name>SNMP-MANAGERS</name>
<apply-path>snmp community &lt;*&gt; clients &lt;*&gt;</apply-path>
</prefix-list>
% cat inventory/host_vars/car01.sgn01.yml
---
interfaces:
lo0:
description: "Loopback"
v4_address: 192.0.2.20/32
% cat inventory/host_vars/car01.hkg01.yml
---
interfaces:
lo0:
description: "Loopback"
v4_address: 192.0.2.21/32
% cat inventory/host_vars/pat01.lax01.yml
---
interfaces:
lo0:
description: "Loopback"
v4_address: 192.0.3.40/32
% cat inventory/hosts
[customer-routers]
car01.sgn01
car01.hkg01
[peering-routers]
pat01.lax01
[all-routers:children]
customer-routers
peering-routers
{% for router in groups['all-routers']|sort %}
{# build iBGP sessions to all routers, except self #}
{% if hostvars[router]['inventory_hostname'] != inventory_hostname %}
<neighbor>
<name>{{ hostvars[router]['interfaces']['lo0']['v4_address']|ipaddr('address') }}</name>
<description>{{ router }}</description>
</neighbor>
{% endif %}
{% endfor %}
% cat output/cat01.sgn01.conf
<bgp>
<neighbor>
<name>192.0.2.21</name>
<description>car01.hkg01</description>
</neighbor>
<neighbor>
<name>192.0.3.40</name>
<description>pat01.lax01</description>
</neighbor>
</bgp>
% cat output/pat01.lax01.conf
<bgp>
<neighbor>
<name>192.0.2.20</name>
<description>car01.sgn01</description>
</neighbor>
<neighbor>
<name>192.0.2.21</name>
<description>car01.hkg01</description>
</neighbor>
</bgp>
% cat output/car02.hkg.conf
<bgp>
<neighbor>
<name>192.0.2.20</name>
<description>car01.sgn01</description>
</neighbor>
<neighbor>
<name>192.0.3.40</name>
<description>par01.lax02</description>
</neighbor>
</bgp>
➔ inventory
➔
➔
pat01.lax xe-1/0/2 198.51.100.47/
24
2001:db8:51::47/64 Peering Angeles-IX
car04.sfo ge-2/0/8 192.0.2.248/30 2001:db8:0::/56 Customer 6Ten Stores
br02.sgn xe-1/2/6 203.0.113.2/30 2001:db8:0:910::1/127 Transit PTT (Ckt #123)
bbr01.hkg he-1/4/8 bbr01.sin he-2/1/7 192.0.2.4/31 2001:db8:ba:24::/127 Backbone
% ./inventory/csv2json.py --list
---
{
"_meta": {
"hostvars": {
"pat01.lax": {
"interfaces": {
"xe-1/0/2": {
"description": "PEERING: Angeles-IX”,
"type": "Peering",
"v4_address": "198.51.100.47/24",
"v6_address": "2001:Db8:51::47/647"
}
}
},
"car04.sfo": {
"interfaces": {
"ge-2/0/8": {
"description": "CUSTOMER: 6Ten Stores”,
"type": "Customer",
"v4_address": "192.0.2.249/30",
"v6_address": "2001:db8:0::/56"
}
}
},
"bar02.sgn": {
"interfaces": {
"xe-1/2/6": {
"description": "TRANSIT: PTT (Ckt #123)”,
"type": "Transit",
"v4_address": "203.0.113.2/30",
"v6_address": "2001:db8:0:910::1/127"
}
}
},
"bbr01.hkg": {
"interfaces": {
"he-1/4/8": {
"description": "BACKBONE: bbr01.sin:he-2/1/7”,
"type": "Backbone",
"v4_address": "192.0.2.4/31",
"v6_address": "2001:db8:ba:24::/127"
...
"bbr01.sin": {
"interfaces": {
"he-2/1/7": {
"description": "BACKBONE: bbr01.hkg:he-1/4/8”,
"type": "Backbone",
"v4_address": "192.0.2.5/31",
"v6_address": "2001:db8:ba:24::1/127"
...
"ungrouped": {
"vars": {
"dns_entries": [
{
"domain": "myisp.com.",
"record_name": "he-1-4-8.bbr01.hkg.myisp.com”
"record_type": "A",
"record_value": "192.0.2.4"
},
{
"domain": "2.0.192.in-addr.arpa",
"record_name": "4",
"record_type": "PTR",
"record_value": "he-1-4-8.bbr01.myisp.com."
➔
➔
➔
➔
Juniper “core” Indented, set, or XML “passwd”
Juniper “junos-stdlib” Indented, set, or XML “passwd” Serial console, telnet support
NAPALM Indented “password” Powerful validation & facts support
---
- name: Backup running configuration
junos_get_config: >
host={{ ansible_host }} format=xml
dest=myrouters/{{ inventory_hostname }}_running.xml
- name: Compile configuration
template: >
src=juniper.conf.j2
dest=myrouters/{{ inventory_hostname }}_compiled.xml
- name: Deploy configuration
junos_install_config: >
host={{ ansible_host }} replace=yes timeout=45
file=myrouters/{{ inventory_hostname }}_compiled.xml
- name: Create new user account
user: name={{ item.name }} password={{ item.password }}
when: ansible_distribution == "CentOS"
- name: Create new user account
user: name={{ item.name }} password={{ item.password }}
when:
- ansible_distribution == "CentOS"
- “{{ item.user_type }}” == “admin”
% cat ansible.cfg
[defaults]
ansible_managed = %a %b %d %H:%M:%S %z %Y
% cat roles/juniper/templates/main.j2
<configuration operation="replace" xmlns:junos="junos">
<junos:comment>
##############################################################################
# HEADER: This file was generated by Ansible on {{ ansible_managed }}
# HEADER: Source {{ template_path }}
# HEADER: Built by {{ template_uid }} on {{ template_host }}
##############################################################################
</junos:comment>
<system>
<host-name>{{ inventory_hostname | mandatory }}</host-name>
...
% cat output/edge01.fmt01.conf
<configuration operation="replace" xmlns:junos="junos">
<junos:comment>
##############################################################################
# HEADER: This file was generated by Ansible on Mon Feb 20 18:34:26 -0800 2017
# HEADER: Source /Users/matt/work/ansible/roles/juniper/templates/main.j2
# HEADER: Built by matt on BSD4lyfe.local
##############################################################################
</junos:comment>
<system>
<host-name>edge01.fmt01</host-name>
...
matt@edge01.fmt01> show configuration
/*
##############################################################################
# HEADER: This file was generated by Ansible on Mon Feb 20 18:34:26 -0800 2017
# HEADER: Source /Users/matt/work/ansible/roles/juniper/templates/main.j2
# HEADER: Built by matt on BSD4lyfe.local
#############################################################################
*/
system {
host-name edge01.fmt01;
...
➔
➔
➔ error_on_undefined_vars ansible.cfg
➔ ansible -v
○
○ ntc_show_command
○
○
○
○
○
● http://jedelman.com/
● https://blog.tylerc.me/
● https://pynet.twb-tech.com/
● http://packetpushers.net/
● http://keepingitclassless.net/
● http://ansible-tips-and-tricks.rtfd.org/
me@bronwynlewis.com @bronwyn
matt@peterson.org @dorkmatt

Más contenido relacionado

La actualidad más candente

Ansibleで始めるインフラ構築自動化
Ansibleで始めるインフラ構築自動化Ansibleで始めるインフラ構築自動化
Ansibleで始めるインフラ構築自動化dcubeio
 
Network Automation with Ansible
Network Automation with AnsibleNetwork Automation with Ansible
Network Automation with AnsibleAnas
 
Ansible ネットワーク自動化チュートリアル (JANOG42)
Ansible ネットワーク自動化チュートリアル (JANOG42)Ansible ネットワーク自動化チュートリアル (JANOG42)
Ansible ネットワーク自動化チュートリアル (JANOG42)akira6592
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleKnoldus Inc.
 
Ansible quickstart
Ansible quickstartAnsible quickstart
Ansible quickstartHideki Saito
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practicesBas Meijer
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020Akihiro Suda
 
IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向Yuya Rin
 
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...Simplilearn
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migrationymtech
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to AnsibleCoreStack
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansibleGeorge Shuklin
 
#logstudy 01 rsyslog入門
#logstudy 01 rsyslog入門#logstudy 01 rsyslog入門
#logstudy 01 rsyslog入門Takashi Takizawa
 
RHEL7/CentOS7 NetworkManager徹底入門
RHEL7/CentOS7 NetworkManager徹底入門RHEL7/CentOS7 NetworkManager徹底入門
RHEL7/CentOS7 NetworkManager徹底入門Etsuji Nakai
 
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!Etsuji Nakai
 
ネットワークエンジニア的Ansibleの始め方
ネットワークエンジニア的Ansibleの始め方ネットワークエンジニア的Ansibleの始め方
ネットワークエンジニア的Ansibleの始め方akira6592
 

La actualidad más candente (20)

Ansibleで始めるインフラ構築自動化
Ansibleで始めるインフラ構築自動化Ansibleで始めるインフラ構築自動化
Ansibleで始めるインフラ構築自動化
 
Network Automation with Ansible
Network Automation with AnsibleNetwork Automation with Ansible
Network Automation with Ansible
 
Ansible
AnsibleAnsible
Ansible
 
Ansible ネットワーク自動化チュートリアル (JANOG42)
Ansible ネットワーク自動化チュートリアル (JANOG42)Ansible ネットワーク自動化チュートリアル (JANOG42)
Ansible ネットワーク自動化チュートリアル (JANOG42)
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Network automation (NetDevOps) with Ansible
Network automation (NetDevOps) with AnsibleNetwork automation (NetDevOps) with Ansible
Network automation (NetDevOps) with Ansible
 
ansible why ?
ansible why ?ansible why ?
ansible why ?
 
Accelerating with Ansible
Accelerating with AnsibleAccelerating with Ansible
Accelerating with Ansible
 
Ansible quickstart
Ansible quickstartAnsible quickstart
Ansible quickstart
 
Ansible, best practices
Ansible, best practicesAnsible, best practices
Ansible, best practices
 
[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020[KubeCon NA 2020] containerd: Rootless Containers 2020
[KubeCon NA 2020] containerd: Rootless Containers 2020
 
IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向IPv4/IPv6 移行・共存技術の動向
IPv4/IPv6 移行・共存技術の動向
 
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
What Is Ansible? | How Ansible Works? | Ansible Tutorial For Beginners | DevO...
 
Openstack live migration
Openstack live migrationOpenstack live migration
Openstack live migration
 
Introduction to Ansible
Introduction to AnsibleIntroduction to Ansible
Introduction to Ansible
 
Best practices for ansible
Best practices for ansibleBest practices for ansible
Best practices for ansible
 
#logstudy 01 rsyslog入門
#logstudy 01 rsyslog入門#logstudy 01 rsyslog入門
#logstudy 01 rsyslog入門
 
RHEL7/CentOS7 NetworkManager徹底入門
RHEL7/CentOS7 NetworkManager徹底入門RHEL7/CentOS7 NetworkManager徹底入門
RHEL7/CentOS7 NetworkManager徹底入門
 
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
30分でRHEL6 High Availability Add-Onを超絶的に理解しよう!
 
ネットワークエンジニア的Ansibleの始め方
ネットワークエンジニア的Ansibleの始め方ネットワークエンジニア的Ansibleの始め方
ネットワークエンジニア的Ansibleの始め方
 

Destacado

Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them AllTim Fairweather
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsMunir Njiru
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupGreg DeKoenigsberg
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with AnsibleMartin Etmajer
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricksbcoca
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeSarah Z
 
Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)Chu-Siang Lai
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and ContainersRodolfo Carvalho
 
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerDennis Rowe
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Chu-Siang Lai
 
Japan IPv6 Measurement
Japan IPv6 MeasurementJapan IPv6 Measurement
Japan IPv6 MeasurementAPNIC
 
Evolving the network for 5G
Evolving the network for 5GEvolving the network for 5G
Evolving the network for 5GAPNIC
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleRobert Reiz
 
The Death of Transit and Beyond
The Death of Transit and BeyondThe Death of Transit and Beyond
The Death of Transit and BeyondAPNIC
 
Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)Chu-Siang Lai
 
Journey to IPv6 - A Real-World deployment for Mobiles
Journey to IPv6 - A Real-World deployment for MobilesJourney to IPv6 - A Real-World deployment for Mobiles
Journey to IPv6 - A Real-World deployment for MobilesAPNIC
 
DNSSEC/DANE/TLS Testing in Go6Lab
DNSSEC/DANE/TLS Testing in Go6LabDNSSEC/DANE/TLS Testing in Go6Lab
DNSSEC/DANE/TLS Testing in Go6LabAPNIC
 
Community Networks: An Alternative Paradigm for Developing Network Infrastruc...
Community Networks: An Alternative Paradigm for Developing Network Infrastruc...Community Networks: An Alternative Paradigm for Developing Network Infrastruc...
Community Networks: An Alternative Paradigm for Developing Network Infrastruc...APNIC
 

Destacado (20)

Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
Automation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploitsAutomation of web attacks from advisories to create real world exploits
Automation of web attacks from advisories to create real world exploits
 
Ansible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetupAnsible loves Python, Python Philadelphia meetup
Ansible loves Python, Python Philadelphia meetup
 
Automated Deployments with Ansible
Automated Deployments with AnsibleAutomated Deployments with Ansible
Automated Deployments with Ansible
 
Ansible tips & tricks
Ansible tips & tricksAnsible tips & tricks
Ansible tips & tricks
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)Automate with Ansible basic (2/e)
Automate with Ansible basic (2/e)
 
Automation with Ansible and Containers
Automation with Ansible and ContainersAutomation with Ansible and Containers
Automation with Ansible and Containers
 
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
 
Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)Automate with Ansible basic (2/e, English)
Automate with Ansible basic (2/e, English)
 
Japan IPv6 Measurement
Japan IPv6 MeasurementJapan IPv6 Measurement
Japan IPv6 Measurement
 
Evolving the network for 5G
Evolving the network for 5GEvolving the network for 5G
Evolving the network for 5G
 
Infrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & AnsibleInfrastructure Deployment with Docker & Ansible
Infrastructure Deployment with Docker & Ansible
 
Rundeck & Ansible
Rundeck & AnsibleRundeck & Ansible
Rundeck & Ansible
 
The Death of Transit and Beyond
The Death of Transit and BeyondThe Death of Transit and Beyond
The Death of Transit and Beyond
 
Ansible 2.0
Ansible 2.0Ansible 2.0
Ansible 2.0
 
Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)Automate with Ansible basic (3/e)
Automate with Ansible basic (3/e)
 
Journey to IPv6 - A Real-World deployment for Mobiles
Journey to IPv6 - A Real-World deployment for MobilesJourney to IPv6 - A Real-World deployment for Mobiles
Journey to IPv6 - A Real-World deployment for Mobiles
 
DNSSEC/DANE/TLS Testing in Go6Lab
DNSSEC/DANE/TLS Testing in Go6LabDNSSEC/DANE/TLS Testing in Go6Lab
DNSSEC/DANE/TLS Testing in Go6Lab
 
Community Networks: An Alternative Paradigm for Developing Network Infrastruc...
Community Networks: An Alternative Paradigm for Developing Network Infrastruc...Community Networks: An Alternative Paradigm for Developing Network Infrastruc...
Community Networks: An Alternative Paradigm for Developing Network Infrastruc...
 

Similar a Network Automation: Ansible 102

Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by CapistranoTasawr Interactive
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slidesharetomcopeland
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)Kritika910
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppSmartLogic
 
Automating the Network
Automating the NetworkAutomating the Network
Automating the NetworkPuppet
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeAndrea Cardinale
 
Curscatalyst
CurscatalystCurscatalyst
CurscatalystKar Juan
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworksdiego_k
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebookguoqing75
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统yiditushe
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationSean Chittenden
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios
 

Similar a Network Automation: Ansible 102 (20)

Deploy Rails Application by Capistrano
Deploy Rails Application by CapistranoDeploy Rails Application by Capistrano
Deploy Rails Application by Capistrano
 
Railsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshareRailsconf2011 deployment tips_for_slideshare
Railsconf2011 deployment tips_for_slideshare
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
EC2
EC2EC2
EC2
 
49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)49368010 projectreportontraininganddevelopment(1)
49368010 projectreportontraininganddevelopment(1)
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Practical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails AppPractical Chef and Capistrano for Your Rails App
Practical Chef and Capistrano for Your Rails App
 
Sinatra for REST services
Sinatra for REST servicesSinatra for REST services
Sinatra for REST services
 
Monkey man
Monkey manMonkey man
Monkey man
 
Os Wilhelm
Os WilhelmOs Wilhelm
Os Wilhelm
 
Automating the Network
Automating the NetworkAutomating the Network
Automating the Network
 
Puppet Data Mining
Puppet Data MiningPuppet Data Mining
Puppet Data Mining
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
 
Curscatalyst
CurscatalystCurscatalyst
Curscatalyst
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Memcached Study
Memcached StudyMemcached Study
Memcached Study
 
Incrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern AutomationIncrementalism: An Industrial Strategy For Adopting Modern Automation
Incrementalism: An Industrial Strategy For Adopting Modern Automation
 
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
Nagios Conference 2014 - Rob Hassing - How To Maintain Over 20 Monitoring App...
 

Más de APNIC

APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024APNIC
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119APNIC
 
draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119APNIC
 
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119APNIC
 
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119APNIC
 
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119APNIC
 
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...APNIC
 
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85APNIC
 
NANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff HustonNANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff HustonAPNIC
 
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff HustonDNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff HustonAPNIC
 
APAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, ThailandAPAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, ThailandAPNIC
 
Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6APNIC
 
AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!APNIC
 
CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023APNIC
 
AFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet developmentAFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet developmentAPNIC
 

Más de APNIC (20)

APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
DDoS In Oceania and the Pacific, presented by Dave Phelan at NZNOG 2024
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119IP addressing and IPv6, presented by Paul Wilson at IETF 119
IP addressing and IPv6, presented by Paul Wilson at IETF 119
 
draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119draft-harrison-sidrops-manifest-number-01, presented at IETF 119
draft-harrison-sidrops-manifest-number-01, presented at IETF 119
 
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
Making an RFC in Today's IETF, presented by Geoff Huston at IETF 119
 
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
IPv6 Operational Issues (with DNS), presented by Geoff Huston at IETF 119
 
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
Is DNS ready for IPv6, presented by Geoff Huston at IETF 119
 
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
Benefits of doing Internet peering and running an Internet Exchange (IX) pres...
 
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
APNIC Update and RIR Policies for ccTLDs, presented at APTLD 85
 
NANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff HustonNANOG 90: 'BGP in 2023' presented by Geoff Huston
NANOG 90: 'BGP in 2023' presented by Geoff Huston
 
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff HustonDNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
DNS-OARC 42: Is the DNS ready for IPv6? presentation by Geoff Huston
 
APAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, ThailandAPAN 57: APNIC Report at APAN 57, Bangkok, Thailand
APAN 57: APNIC Report at APAN 57, Bangkok, Thailand
 
Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6Lao Digital Week 2024: It's time to deploy IPv6
Lao Digital Week 2024: It's time to deploy IPv6
 
AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!AINTEC 2023: Networking in the Penumbra!
AINTEC 2023: Networking in the Penumbra!
 
CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023CNIRC 2023: Global and Regional IPv6 Deployment 2023
CNIRC 2023: Global and Regional IPv6 Deployment 2023
 
AFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet developmentAFSIG 2023: APNIC Foundation and support for Internet development
AFSIG 2023: APNIC Foundation and support for Internet development
 

Último

Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Datingkojalkojal131
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceEscorts Call Girls
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.soniya singh
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...SUHANI PANDEY
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Call Girls in Nagpur High Profile
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...SUHANI PANDEY
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 

Último (20)

Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft DatingDubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
Dubai Call Girls Milky O525547819 Call Girls Dubai Soft Dating
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts ServiceReal Escorts in Al Nahda +971524965298 Dubai Escorts Service
Real Escorts in Al Nahda +971524965298 Dubai Escorts Service
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Dlf City Phase 3 Gurgaon >༒8448380779 Escort Service
 
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Samalka Delhi >༒8448380779 Escort Service
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Himatnagar 7001035870 Whatsapp Number, 24/07 Booking
 
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
Low Sexy Call Girls In Mohali 9053900678 🥵Have Save And Good Place 🥵
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
VVIP Pune Call Girls Sinhagad WhatSapp Number 8005736733 With Elite Staff And...
 
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
(INDIRA) Call Girl Pune Call Now 8250077686 Pune Escorts 24x7
 
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...Top Rated  Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Pollachi 7001035870 Whatsapp Number, 24/07 Booking
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 

Network Automation: Ansible 102

  • 1. APRICOT - Feb 28th, 2017
  • 4.
  • 6. location: sfo location: - sfo - sgn sites: - location: sfo type: customer - location: sgn type: backbone
  • 7. {{ location }} {{ item }} {{ item.location }} {{ item.x.location }}
  • 8.
  • 9. ➔ ansible-playbook -i inventory playbook.yml ➔ ● hosts ● host_vars ● group_vars ➔ inventory
  • 10. ➔ /etc/ansible/hosts ● Hard to manage across systems ● Usually need to be root to edit ● Can’t easily keep in revision control ➔ ./inventory/hosts ● Easily manage in revision control ● No root needed! ● Ensure everyone is using correct hosts hosts
  • 11. [all-routers:children] customer-routers peering-routers [customer-routers] car01.sgn01 ansible_host=192.0.2.20 model=mx104 car01.hkg01 ansible_host=192.0.2.21 model=mx104 [peering-routers] pat01.lax01 ansible_host=192.0.3.40 model=asr1k pat01.tyo01 ansible_host=192.0.3.41 model=ask9k [websites] bronwynlewis.com hosts
  • 12. % tree ├ ansible │ ├── inventory │ │ ├── group_vars │ │ │ ├── all.yml │ │ │ ├── development.yml │ │ │ └── production.yml │ │ ├── hosts │ │ └── host_vars │ │ ├── jumphost.yml │ │ └── mail.yml │ ├── playbook.yml │ └── roles hosts & [host|group]_vars % cat inventory/hosts [production:children] admin website [admin] mail jumphost [website] web1 web2 db1
  • 13. ➔ ➔ host_vars/mail.yml ● Variables to be used by the mail host ➔ host_vars/jumphost.yml ● Variables to be used by the jumphost host host_vars
  • 14. % cat inventory/hosts (before) [customer-routers] car01.sgn01 ansible_host=192.0.2.20 model=mx104 % cat inventory/host_vars/car01.sgn01.yml --- ansible_host: 192.0.2.20 model: mx104 location: sgn % cat inventory/hosts (after) [customer-routers] car01.sgn01 host_vars
  • 15. ➔ ➔ group_vars/production.yml ● Vars to be used by any host in production group ➔ group_vars/all.yml ● Contains vars to be used by ALL hosts group_vars
  • 16. ansible all -i localhost, -m setup --connection=local
  • 17. [...] "ansible_distribution": "Ubuntu", "ansible_distribution_major_version": "16", "ansible_distribution_release": "xenial", "ansible_distribution_version": "16.04", "ansible_dns": { "nameservers": [ "8.8.8.8", "4.2.2.2" ] }, [...]
  • 18. % sudo -H pip install passlib % sudo -H ansible-galaxy install Juniper.junos % ansible-playbook -i bordergw01.hkg.domain.tld, test.yml
  • 19. --- - name: Sample play hosts: bordergw01.hkg.domain.tld roles: - Juniper.junos gather_facts: no connection: local vars: ansible_user: matt vars_prompt: name: passwd prompt: JunOS password private: yes
  • 20. tasks: - name: Collect JunOS facts junos_get_facts: host={{ inventory_hostname }} user={{ ansible_user }} passwd={{ passwd }} register: junos - name: Dump JunOS facts to stdout debug: msg="{{ junos.facts }}"
  • 21. % ansible-playbook -i bordergw01.hkg.domain.tld, test.yml JunOS password: PLAY [Sample play] ************************************** TASK [Collect JunOS facts] ****************************** TASK [Dump JunOS facts to stdout] *********************** ok: [bordergw01.hkg.domain.tld] => { "msg": {
  • 22. [...] "hostname": "bordergw01.hkg.domain.tld", "ifd_style": "CLASSIC", "master": "RE0", "model": "MX104", "personality": "MX", "serialnumber": "H7931", "switch_style": "BRIDGE_DOMAIN", "vc_capable": false, "version": "13.3R6.5", "version_RE0": "13.3R6.5", [...]
  • 23.
  • 24. ➔ ● ipaddr filter is a great example ● Perform regex, perform math, etc. against vars ➔ ● Can be direct variables ● Can be variables pulled in
  • 25. {{ foo | default(‘bar’) }} {{ foo | mandatory }}
  • 26. mandatory TASK [hello : Generate "hello"] *********************************** failed: [localhost] (item={u'name': u'world', u'number': 1}) => {"failed": true, "item": {"name": "world", "number": 1}, "msg": "AnsibleFilterError: Mandatory variable not defined."} {{ foo | mandatory }}
  • 27. {{ “hkg.foo.com” | regex_replace('^(.*).(w.*)$', '2') | upper }} {{ “198.168.0.123/24”|ipaddr('address')|splitext| last|regex_replace('^[.]','') }}
  • 28. {{ item.ipv4 | ipaddr(‘network’) }} ipaddr(‘address’) 192.0.2.5 ipaddr(‘network’) 192.0.2.0 ipaddr(‘netmask’) 255.255.255.0 ipaddr(‘broadcast’) 192.0.2.255
  • 30. % ansible all -i localhost, -m debug -a "msg={{'203.0.113.0/24'|ipaddr('net')|ipaddr('-1')|ipaddr('address')}}" localhost | SUCCESS => { "msg": "203.0.113.255" } % ansible all -i localhost, -m debug -a "msg={{'266.1.2.3/24'|ipaddr('net')}}" localhost | SUCCESS => { "msg": false } % ansible all -i localhost, -m debug -a "msg={{'2001:db8::/32'|ipaddr('net')|ipaddr('2')}}" localhost | SUCCESS => { "msg": "2001:db8::2/32"
  • 31. {{ item.ipv4 | ipaddr(‘network’) }} {% set network = item.ipv4 | ipaddr('network') %} {{ network }}
  • 32. % cat templates/dns.j2 {% set dnsservers = [‘192.168.1.2’, ‘172.16.100.4’] %} {% for nameserver in dnsservers %} ip name-server {{ nameserver }} {% endfor %} % cat output ip name-server 192.168.1.2 ip name-server 172.16.100.4
  • 34. {% if dhcp is True %} {% include dhcp.j2 %} {% endif %} service dhcp ip dhcp pool {{ item.hostname | upper }} [...]
  • 35. {% if dhcp is True %} {% include dhcp.j2 %} {% endif %} dhcp: True
  • 37. - users: - first_name: david last_name: bowie team: accounting - first_name: grace last_name: jones team: engineering {% for x in users %} {{ x.first_name | title }}, {{ x.team | title }} {% endfor %} % cat output David, Accounting Grace, Engineering
  • 38.
  • 39. {% set macros = { "DNS-SERVERS": "system name-server <*>", "NTP-SERVERS": "system ntp server <*>" "SNMP-MANAGERS": "snmp community <*> clients <*>", %} {% for key, value in macros.iteritems() %} <prefix-list> <name>{{ key }}</name> <apply-path>{{ value|escape }}</apply-path> </prefix-list> {% endfor %}
  • 40. <prefix-list> <name>DNS-SERVERS</name> <apply-path>system name-server &lt;*&gt;</apply-path> </prefix-list> <prefix-list> <name>NTP-SERVERS</name> <apply-path>system ntp server &lt;*&gt;</apply-path> </prefix-list> <prefix-list> <name>SNMP-MANAGERS</name> <apply-path>snmp community &lt;*&gt; clients &lt;*&gt;</apply-path> </prefix-list>
  • 41. % cat inventory/host_vars/car01.sgn01.yml --- interfaces: lo0: description: "Loopback" v4_address: 192.0.2.20/32 % cat inventory/host_vars/car01.hkg01.yml --- interfaces: lo0: description: "Loopback" v4_address: 192.0.2.21/32 % cat inventory/host_vars/pat01.lax01.yml --- interfaces: lo0: description: "Loopback" v4_address: 192.0.3.40/32 % cat inventory/hosts [customer-routers] car01.sgn01 car01.hkg01 [peering-routers] pat01.lax01 [all-routers:children] customer-routers peering-routers
  • 42. {% for router in groups['all-routers']|sort %} {# build iBGP sessions to all routers, except self #} {% if hostvars[router]['inventory_hostname'] != inventory_hostname %} <neighbor> <name>{{ hostvars[router]['interfaces']['lo0']['v4_address']|ipaddr('address') }}</name> <description>{{ router }}</description> </neighbor> {% endif %} {% endfor %}
  • 43. % cat output/cat01.sgn01.conf <bgp> <neighbor> <name>192.0.2.21</name> <description>car01.hkg01</description> </neighbor> <neighbor> <name>192.0.3.40</name> <description>pat01.lax01</description> </neighbor> </bgp> % cat output/pat01.lax01.conf <bgp> <neighbor> <name>192.0.2.20</name> <description>car01.sgn01</description> </neighbor> <neighbor> <name>192.0.2.21</name> <description>car01.hkg01</description> </neighbor> </bgp> % cat output/car02.hkg.conf <bgp> <neighbor> <name>192.0.2.20</name> <description>car01.sgn01</description> </neighbor> <neighbor> <name>192.0.3.40</name> <description>par01.lax02</description> </neighbor> </bgp>
  • 44.
  • 46. pat01.lax xe-1/0/2 198.51.100.47/ 24 2001:db8:51::47/64 Peering Angeles-IX car04.sfo ge-2/0/8 192.0.2.248/30 2001:db8:0::/56 Customer 6Ten Stores br02.sgn xe-1/2/6 203.0.113.2/30 2001:db8:0:910::1/127 Transit PTT (Ckt #123) bbr01.hkg he-1/4/8 bbr01.sin he-2/1/7 192.0.2.4/31 2001:db8:ba:24::/127 Backbone
  • 47. % ./inventory/csv2json.py --list --- { "_meta": { "hostvars": { "pat01.lax": { "interfaces": { "xe-1/0/2": { "description": "PEERING: Angeles-IX”, "type": "Peering", "v4_address": "198.51.100.47/24", "v6_address": "2001:Db8:51::47/647" } } },
  • 48. "car04.sfo": { "interfaces": { "ge-2/0/8": { "description": "CUSTOMER: 6Ten Stores”, "type": "Customer", "v4_address": "192.0.2.249/30", "v6_address": "2001:db8:0::/56" } } },
  • 49. "bar02.sgn": { "interfaces": { "xe-1/2/6": { "description": "TRANSIT: PTT (Ckt #123)”, "type": "Transit", "v4_address": "203.0.113.2/30", "v6_address": "2001:db8:0:910::1/127" } } },
  • 50. "bbr01.hkg": { "interfaces": { "he-1/4/8": { "description": "BACKBONE: bbr01.sin:he-2/1/7”, "type": "Backbone", "v4_address": "192.0.2.4/31", "v6_address": "2001:db8:ba:24::/127" ... "bbr01.sin": { "interfaces": { "he-2/1/7": { "description": "BACKBONE: bbr01.hkg:he-1/4/8”, "type": "Backbone", "v4_address": "192.0.2.5/31", "v6_address": "2001:db8:ba:24::1/127"
  • 51. ... "ungrouped": { "vars": { "dns_entries": [ { "domain": "myisp.com.", "record_name": "he-1-4-8.bbr01.hkg.myisp.com” "record_type": "A", "record_value": "192.0.2.4" }, { "domain": "2.0.192.in-addr.arpa", "record_name": "4", "record_type": "PTR", "record_value": "he-1-4-8.bbr01.myisp.com."
  • 52.
  • 54. Juniper “core” Indented, set, or XML “passwd” Juniper “junos-stdlib” Indented, set, or XML “passwd” Serial console, telnet support NAPALM Indented “password” Powerful validation & facts support
  • 55. --- - name: Backup running configuration junos_get_config: > host={{ ansible_host }} format=xml dest=myrouters/{{ inventory_hostname }}_running.xml - name: Compile configuration template: > src=juniper.conf.j2 dest=myrouters/{{ inventory_hostname }}_compiled.xml - name: Deploy configuration junos_install_config: > host={{ ansible_host }} replace=yes timeout=45 file=myrouters/{{ inventory_hostname }}_compiled.xml
  • 56.
  • 57. - name: Create new user account user: name={{ item.name }} password={{ item.password }} when: ansible_distribution == "CentOS" - name: Create new user account user: name={{ item.name }} password={{ item.password }} when: - ansible_distribution == "CentOS" - “{{ item.user_type }}” == “admin”
  • 58. % cat ansible.cfg [defaults] ansible_managed = %a %b %d %H:%M:%S %z %Y % cat roles/juniper/templates/main.j2 <configuration operation="replace" xmlns:junos="junos"> <junos:comment> ############################################################################## # HEADER: This file was generated by Ansible on {{ ansible_managed }} # HEADER: Source {{ template_path }} # HEADER: Built by {{ template_uid }} on {{ template_host }} ############################################################################## </junos:comment> <system> <host-name>{{ inventory_hostname | mandatory }}</host-name> ...
  • 59. % cat output/edge01.fmt01.conf <configuration operation="replace" xmlns:junos="junos"> <junos:comment> ############################################################################## # HEADER: This file was generated by Ansible on Mon Feb 20 18:34:26 -0800 2017 # HEADER: Source /Users/matt/work/ansible/roles/juniper/templates/main.j2 # HEADER: Built by matt on BSD4lyfe.local ############################################################################## </junos:comment> <system> <host-name>edge01.fmt01</host-name> ...
  • 60. matt@edge01.fmt01> show configuration /* ############################################################################## # HEADER: This file was generated by Ansible on Mon Feb 20 18:34:26 -0800 2017 # HEADER: Source /Users/matt/work/ansible/roles/juniper/templates/main.j2 # HEADER: Built by matt on BSD4lyfe.local ############################################################################# */ system { host-name edge01.fmt01; ...
  • 62.
  • 65. ● http://jedelman.com/ ● https://blog.tylerc.me/ ● https://pynet.twb-tech.com/ ● http://packetpushers.net/ ● http://keepingitclassless.net/ ● http://ansible-tips-and-tricks.rtfd.org/