"But when calling ansible containers the information from the hosts are used.. "
This is correct. Variables are brought in from all the groups a host is a member of, not just the hosts you are selecting. Imagine you have hosts grouped by function (webservers, dbservers), datacenter (phoenix, atlanta), and also hardware type (dell3200, ibm286), etc. Some hardware information might come from the hardware group, but you selected the webserver group to configure. Thus variables should come from all sources. On Wed, May 14, 2014 at 3:38 AM, Robin Speekenbrink < [email protected]> wrote: > Just a quick question: > I have a docker container running an SSH daemon on a host running an SSH > deamon both with different users and ports... Thus my invenvory looks > something like this: > [hosts:vars] > ansible_ssh_user=hroot > ansible_ssh_port=2221 > > [hosts] > host1 > host2 > > [containers:vars] > ansible_ssh_user=croot > ansible_ssh_port=2222 > > [containers] > host1 > host2 > > But when calling ansible containers the information from the hosts are > used.. > > Another thing in my situation: the hosts lists themselves (host1 and host2 > in my example) should be dynamic since the're running in an autoscaling EC2 > cloud :D > Am i doing it wrong? :) > > Thanks! > > Robin > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ansible-project/4e07df6a-c680-48c9-956d-8ac45638947b%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/4e07df6a-c680-48c9-956d-8ac45638947b%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgxxDDd97TSbmqjXn2WpJNOkuacuDUYy-De3S%2B1RrAXUxA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
