cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2281
Views
0
Helpful
0
Comments
Sean.Cavanaugh
Level 1
Level 1

With Ansible playbooks for networking platforms, historically most of the networking modules require a provider argument per task (which supplied the connection type, username, password, etc).

 

With Ansible 2.5 (which you can install now, via the latest dev release) allows connection: network_cli as a top level connection which is supported by all the major Cisco platforms now (ios, nxos, iosxr). Also connection: netconf is supported on iosxr. The deprecation for provider won't begin with Ansible 2.5, and will take considerable time, so there will not be any rush to update playbooks.

The network_cli and netconf connection plugins will allow playbooks to look, feel and operate just like they do on Linux hosts. Also the error reporting is significantly improved, which will help a lot of people who were frustrated with changes to Ansible in 2.3.

 

Here is a quick example, the follow example will provide a 1-task playbook that performs a backup of the configuration for the host rtr1:

---
- hosts: rtr1
  connection: network_cli
  remote_user: admin
  become: yes
  become_method: enable

  tasks:
    - name: Backup configuration
      ios_config:
        backup: yes

For more examples and details visit my blog post here: https://www.ansible.com/blog/coming-soon-networking-features-in-ansible-2.5

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: