Performing config changes with Nautobot and Ansible for Cisco NX-OS devices
Next, we are going to shift gears again and do some automation for Cisco Nexus switches. We already covered many of the concepts used, so we are going to jump right into the playbook.
The play declaration is just as we’ve seen in previous playbooks, but now we’ll automate the Nexus devices by using the nxos
group that was built by creating groups from the NAPALM platform driver:
---- name: "DEPLOY DEVICE CONFIGURATIONS"   hosts: "nxos"   gather_facts: false   connection: "ansible.netcommon.network_cli"   vars:     ansible_ssh_password: "{{ lookup('env', 'NTC_NET_PASSWORD') }}"
This time, we are going to generate configs from a Jinja template. The next task ensures there is a directory created per location. For production use cases, you’d want to do this task in...