• jcnetworking
  • LONDON
ANSIBLE / PYTHON
Network Automation on GNS3 – ANSIBLE  no.2

Network Automation on GNS3 – ANSIBLE no.2

<AIMS>
Automation of Using Linux Ansible to obtain information from network devices, also giving commands to Routers & Switch enable “CDP RUN” ,enable ” show ip inter br”, & create OSPF.

no.1 labs, I’m using ssh command line to login (” -u tech -k “), on this lab, I”m using ssh variable to ping and ansible-playbook.

Also using ansible to telnet the switch

Figure1.1

<CONFIGURATION>
– General setup for the Router / Switch – Interfaces, SSH, username…etc

playbook and setup files you can find it at my git hub, Link below
devs-automate/ansible/project_2 at main ยท yourlifeuk/devs-automate (github.com)

Ansible file config
-> /etc/ansible/group_vars (“providing ssh variable”)
-> /etc/ansible/hosts (“providing your devices name and ip address”)
-> /etc/ansible/ansible.cfg

Figure 2.1

<PROBLEM THAT I HAD>

  • using ansible to connect the switch, can’t using the same method as SSH
  • Register and printing out the result -> under telnet / SSH command is different

<RESULT>
on Figure 3.1 , 3.2 3.3 3.4 Through ansible I had obtained information, and run the commands remotely

Figure 1.1 - Topology
Figure 2.1 - Mind node of this topology
figure 3.1
Figure 3.2
figure 3.4

Leave a Reply

Your email address will not be published. Required fields are marked *