-
Notifications
You must be signed in to change notification settings - Fork 419
Open
Description
Summary
Add support for loading SSH/NETCONF credentials from the auto-generated ansible-inventory.yml file during containerlab save operations.
Motivation
Currently, the save command uses default credentials from the node registry. When users have configured their lab nodes with custom credentials (documented in the ansible inventory), the save command fails because it doesn't use those credentials.
Proposed Solution
- Parse
ansible-inventory.ymlfrom the lab directory - Extract per-node or per-kind credentials
- Inject credentials into node config before calling
SaveConfig() - Skip nodes that don't need credentials (linux, bridge, etc.)
Implementation Details
- Create `core/inventory_reader.go for parsing ansible inventory
- Modify
core/save.goto load and apply credentials - Use dynamic approach: only skip node kinds that explicitly don't need credentials
- Credentials loaded in-memory only, not persisted to topology
Benefits
- Seamless integration with existing ansible-inventory workflow
- Per-node or per-kind credential support
- Backwards compatible (falls back to defaults if inventory not found)
- No changes to topology files required
Additional Context
This feature complements the existing ansible inventory generation and makes the save workflow more robust when working with customized lab credentials.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels