• jcnetworking
  • LONDON
ANSIBLE / PYTHON
Network automation on GNS3 – ANSIBLE no.1

Network automation on GNS3 – ANSIBLE no.1

<AIMS>
Automation of Using Linux Ansible to obtain information from network devices, also giving commands to Router enable "CDP RUN" and enable " show ip inter br". 

<CONFIGURATION>
- General setup for the Router / Switch  - Interfaces, SSH, username...etc
https://github.com/yourlifeuk/devs-automate/tree/main/ansible/project_1

Ansible file config
-> /etc/hosts   ("putting device ip address and a name of the device")
-> /etc/ansible/hosts ("giving variable that belong to the device")
-> /etc/ansible/ansible.cfg

<PROBLEM THAT I HAD>
- Unable to telnet SW1 by ansible, Still no sorted yet. 
- once ansible connect with R1 by SSH at IP 192.168.1.254. In a sudden asked for password, all password doens't work.  Therefore I had changed R1 -> R3 and IP address 192.168.1.254 -> 192.168.1.249
- on GNS3 Linux need to install "sshpass", so that it will allow me to use ansible "-k" ssh connection

<RESULT> 
on Figure 2.1 & 2.2. Through ansible I had obtained "ip routing " / " ip inter brief" information 
Figure 1.1
Figure 2.1
Figure 2.2

Leave a Reply

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