04-16-2025 01:13 AM
Hi all,
We are using netbox as our SoT and now I want to use ansible to push some configuration to the devices we have in Netbox.
I have made the inventory file and I am getting information from Netbox. But I cannot figure out how to set the ansible_network_os to "ios" and not the platform.slug.
Right now I use IOS-XE as the platform slug for all cat9k switches but ansible expects it to be ios.
My netbox_inventory file:
--- plugin: netbox.netbox.nb_inventory validate_certs: false config_context: false compose: ansible_network_os: platform.slug group_by: - device_roles - sites query_filters: - status: active - tag: ansible device_query_filters: - has_primary_ip: 'true'
Any help to set the ansible_network_os fixed to "ios" is appreciated.
Solved! Go to Solution.
04-16-2025 01:19 AM
Setting the value to '"ios"' solved the issue it just needed to be double qouted.
compose:
ansible_network_os: '"ios"'
04-16-2025 01:19 AM
Setting the value to '"ios"' solved the issue it just needed to be double qouted.
compose:
ansible_network_os: '"ios"'
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide