11-01-2022 01:18 AM
Dear Community,
I am new to Ansible and I am looking for practical solutions to convert/parse existing thousands lines of Cisco configuration on IOS XE, XR & NXOS to a Yaml format for working on the automation with Ansible.
Thanks for your kind sharing and guideline.
Regards,
Rotha
07-07-2023 07:35 AM
Don't feel alone on the Mother Earth.
Maybe the tool, available in the link BELOW, suites your needs?
https://github.com/OliElli/conf2yaml
10-25-2023 12:28 PM
I am going to dance around your question before I attempt to answer it.
When we started our automation journey we didn't simply start managing thousands of devices as single units, but stepped back and built a foundation we could automate around. Something like:
What do we have? Without a Source-of-Truth for our inventory we didn't know what was automatable, so we settled on a platform for that.
Next we build Roles for devices, so that the devices in inventory could properly be categorized.
Finally, we built config templates for devices in a given role.
Ok, so now I am building a YAML file for a role, let's say Core Router. Depending on WHAT you are configuring, if you're using the ios_config module, you may have several 'parents' lines of config. To get started though, parsing config files with python and ciscoconfparse was helpful for me.
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