Ansible + Arista + Netbox

207 views
Skip to first unread message

Ben Jones

unread,
Mar 22, 2023, 8:57:02 PM3/22/23
to Ansible Project
Hello! 

this might be quite specific, but I'm loosing the will...

We're trying to automate our switch configuration using Ansible with Netbox providing the configurations.

I've got a dynamic inventory xml which is generated by querying Netbox via the Rest API based on tags.

I want the playbook to pull all the switch information from Netbox and push it to the relevant switch.

I've had this working for a single switch on a single interface, but after trying for many hours, I can't get it to loop through each interface on each switch.

Is anyone doing anything similar? Is this even a good idea? What am I doing with my life? 

kyle jones

unread,
Mar 23, 2023, 11:54:06 AM3/23/23
to Ansible Project
Hey Ben,

I feel your pain when it comes to designing automation for something. Are you use making your decision making based on the facts pulled from the switch? Care to share a playbook and a debug of the facts you want to loop through?

Heinz Meier

unread,
Mar 23, 2023, 5:15:55 PM3/23/23
to ansible...@googlegroups.com
I am doing this with Cisco. If you understood what you are doing, it is quite simple.

Use the netbox inventory pluging. Be sure to gather the interface information (interfaces: true).
Then use the arista.eos.eos_interfaces module and loop over all interfaces. (or arista.eos.eos_l2_interfaces).

Please contact me directly if you have further questions: m...@sys4.de

At the moment I am compiling some document to describe the network automation with netbox and ansible.

Michael Schwartzkopff

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c3e69742-c27b-442e-963b-875bca46e209n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages