Download as pdf or txt
Download as pdf or txt
You are on page 1of 44

Proven and actionable recipes to automate and manage

network devices using Ansible


©

www.packt.com
Packt.com

www.packt.com

customercare@packtpub.com

www.packt.com

authors.packtpub.com
Chapter 1
Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8
Chapter 9

Chapter 10

Chapter 11

Chapter 12

Chapter 13
www.packt.com
www.packtpub.com/support

www.packt.com

https://github.com/
PacktPublishing/Network-Automation-Cookbook

https://github.com/PacktPublishing/

http://www.packtpub.com/sites/default/files/
downloads/9781789956481_ColorImages.pdf

https://bit.ly/34JooNp
CodeInText

WebStorm-10*.dmg

- name: Configure ACL on IOS-XR


hosts: all
serial: 1
tags: deploy
tasks:
- name: Backup Config
iosxr_config:
backup:

- name: Deploy ACLs


iosxr_config:
src: acl_conf.cfg
match: line


customercare@packtpub.com

www.packtpub.com/support/errata

copyright@packt.com

authors.packtpub.com

packt.com

ping

python3-pip
Chapter 13

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.
html
ch1_ansible

hosts
hosts

csr1-2 mx1-2
[]
group_vars host_vars

ios.yml junos.yml group_vars

mx1.yml csr1.yml host_vars


group_vars

host_vars

host_vars group_vars

vars
vars_files

--e
inventory_hostname
csr1 mx1
play_hosts
csr1
group_names

playbook.yml ch1_ansible
{{ }} group_vars
host_vars debug
msg
-i ansible-playbook

all
ansible_cond.yml ch1_ansible

when when
when
true false
when
when

when

when when

https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html
ansible_loops.yml ch1_ansible

group_vars/cisco.yml

group_vars/juniper.yml

ansible_loops.yml

You might also like