Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nornir inventory file creation #1963

Open
suhaibasaeed opened this issue Mar 29, 2024 · 1 comment
Open

Nornir inventory file creation #1963

suhaibasaeed opened this issue Mar 29, 2024 · 1 comment

Comments

@suhaibasaeed
Copy link

suhaibasaeed commented Mar 29, 2024

Clab currently auto generates an Ansible inventory file which can be used with Nornir via the nornir-ansible plugin. This creates an extra dependency upon this python library. If clab was able to auto-create a Nornir hosts.yaml inventory file it would mean the default SimpleInventory plugin could be used which is already included in the Nornir core package thus removing any dependencies.

Creating this issue to track this new feature request that I will attempt myself and raise a PR for.

Is there a contributing guide or the like available?

@hellt
Copy link
Member

hellt commented Mar 29, 2024

No dev/contributing guide, unfortunately.
But the inventory creation is just a matter of exercising a Go template against the containerlab data.
For example, here is where it all starts for the ansible inventory

func (c *CLab) generateAnsibleInventory(w io.Writer) error {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants