containerlab
                                
                                 containerlab copied to clipboard
                                
                                    containerlab copied to clipboard
                            
                            
                            
                        propagate config vars to ansible inventory yaml file
if a defaults/kinds/node section has a .config.vars section it makes sense to copy it to the ansible invenotory, so that ansible scripts could use those vars
/cc @jrokeach
🙏 Number 1 use case in my mind for this is to provide a ansible_docker_host variable with the container name, to be used with the Ansible docker connection plugin
Actually if this is something that were automatically generated by containerlab, that'd be even better.
Thanks so much for the great tool!
Hi @tobbbles If I understand the plugin purpose correctly (run commands inside containers) then I think you don't need this special variable set. The current inventory hostnames are the fully qualified container names, so you should be able to run docker commands with them
Visiting that now, that's true, however for the hostname to work we actually need to remove the ansible_host var, as here https://github.com/srl-labs/containerlab/pulls?q=is%3Apr+ansible+#issuecomment-1047270956
Would we want something to extend this config section of a node to inform containerlab to not generate teh ansible host, and instead leave just the inventory_hostname to take precedent?