September 2018
Beginner to intermediate
214 pages
5h 53m
English
In this use case, we are going to change some of the generic configurations on Cisco devices. We are going to change the hostname, create a banner, upgrade the SSH to version 2, change the Cisco VTP mode, and configure the DNS server and the NTP server:
---- name: Patch CISCO network devices hosts: ciscoswitches become: yes become_method: enable ansible_connection: network_cli ansible_ssh_pass=admin ansible_become_pass=”P@55w0rd” ansible_network_os=ios strategy: debug connection: ssh serial: 1 gather_facts: yes tasks: - name: Update network device hostname to match the one used in the inventory ios_config: authorize: yes lines: ['hostname {{ inventory_hostname }}'] force: yesRead now
Unlock full access