I think this is a problem of how lxc/LXD works with Ansible and packer. On Mar 21, 2018 19:23, "Stephen Nesbitt" <[email protected]> wrote:
> Ok - take 3 > > This morning I dumped the hostvars variable to see what I could find. What > I found was 2 hosts defined - a "default" host and a "packer-consulserver > host". And lo and behold, in the default host were my groups and my group > variables. These entries are not defined in the packer-consulserver host. > > This is a problem because the ip address assigned to the default host is > 127.0.0.1, and a container named default does not exist so any attempt to > issue lxc commands fails. > > The packer-consulserver host reflects the name of the container and has > a 10.125.175.188 ip address meaning that the lxd connector can make the > connection. The only problem being is that host is missing my group vars > and groups. > > Bottom line, if I don't add the -i packer-consulserver -l > packer-consulserver parameters to my extra variables, ansible uses the > default host and can't connect. > > If I do add the -i packer-consulserver -l packer-consulserver parameters > to my extra variables then ansible uses packer-consulserver as the > inventory host, but my group variables aren't visible. > > I apologize for the lengthy posts, but I've spent a number of hours on > this, and hope that by recording my efforts I might save someone else the > pain and suffering :-) > > And if someone has a solution, I'd love to hear it. > > -steve > > -- > This mailing list is governed under the HashiCorp Community Guidelines - > https://www.hashicorp.com/community-guidelines.html. Behavior in > violation of those guidelines may result in your removal from this mailing > list. > > GitHub Issues: https://github.com/mitchellh/packer/issues > IRC: #packer-tool on Freenode > --- > You received this message because you are subscribed to the Google Groups > "Packer" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/packer-tool/7cf7d077-2397-49bf-b8d1-6d9b0d7afaf7%40googlegroups.com > <https://groups.google.com/d/msgid/packer-tool/7cf7d077-2397-49bf-b8d1-6d9b0d7afaf7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list. GitHub Issues: https://github.com/mitchellh/packer/issues IRC: #packer-tool on Freenode --- You received this message because you are subscribed to the Google Groups "Packer" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/CALz9Rt_H%3DVCGJt4%2B_7vBuO6070ZSvKUWLrhhSTKTmTREn8iykw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
