Ansible 2.5 connection example

We have briefly talked about the addition of network connection changes in Ansible playbooks, starting with version 2.5. Along with the changes, Ansible also released a network best practices document, https://docs.ansible.com/ansible/latest/network/user_guide/network_best_practices_2.5.html. Let's build an example based on the best practices guide. For our topology, we will reuse the topology in Chapter 2, Low-Level Network Device Interactions, with two IOSv devices. Since there are multiple files involved in this example, the files are grouped into a subdirectory named ansible_2-5_example.

Our inventory file is reduced to the group and the name of the hosts:

$ cat hosts[ios-devices]iosv-1iosv-2

We have created ...

Get Mastering Python Networking - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.