https://www.rogerperkin.co.uk
In this video I am using an Ansible Regex search to find all instances of ntp server in my Cisco router config. then remove the old ntp servers and then replace with a new server.
https://www.rogerperkin.co.uk/network...
This Ansible Tutorial uses 3 x Cisco CSR routers and a simple Regex search to find the config I want to change.
Regex -
set_fact: _servers="{{ config.stdout[0] | regex_findall('^ntp server (\S+)', multiline=True) }}"
Playbook on Github:
https://github.com/rogerperkin/networ...
Twitter: / rogernperkin