Dev: Automating network using ansible
This is going to be the last part of this series. As netconf uses a similar approach to restconf (using only xml) I decided that ansible would be be more interesting.
This post, assumes you have ansible already installed. I'll be using local configuration for ansible, overriding the default one. To accomplish this I'll be using the following files:
ansible.cfg > configuration file
hosts > inventory file
pynat_ansible.yml > playbook
group_vars/session_creds.yml > file storing credentials
Ansible structure and configuration is quite easy to understand. Let's look the content of each file:
ansible.cfg
hosts
group_vars/session_creds
pynat_ansible.yml
Run the playbook
ansible-playbook pynat_ansible.yaml
I hope you enjoyed this post, leave your comments below and I'll see you on the next one.