richardbui467 / GNS3-Cisco-Automation-Lab

These are the scripts I have developed in my GNS3 home lab. In the lab, I have Cisco images setup to help me learn Python & Ansible automation.
1 stars 0 forks source link

Ansible - Create router configuration playbook #28

Closed richardbui467 closed 6 months ago

richardbui467 commented 7 months ago

Create a playbook that will configure the following for R1:

richardbui467 commented 7 months ago

Looks like I made some headway into this. I got started by being able to configure IPs w/ cisco.ios.ios_l3_interfaces, but I'm not sure how else I would configure the encapsulation or trunking. I think I would have to use cisco.ios.ios_config module, but I'm not immediately understanding how its parameters work. Gonna have to mess around with it tomorrow to feel it out.

richardbui467 commented 7 months ago

I got something together that I feel like I really understand. Although the coding looks really inefficient. I have to call out the module every time I want to configure a different interface, which seems wasteful. Right now I have ios_config configuring the IP addresses and encapsulation, but I think I will offload the former function to the ios_l3_interfaces module. For the latter function, I think I will have to continue using Ios_config and see what I can optimize.

richardbui467 commented 6 months ago

Closing this since I technically got a fully functioning script. Gonna document improvements in another issue.