Hi, it is because lb3 is in lb group. Group ends when new group start, in your second case lb3 is in payment group.
For lb3 to be in all group only it must be defined before any group is started. David Dne 15. 10. 2015 18:50 napsal uživatel <[email protected]>: > Hi guys, > > I'm facing with an issue and I cannot find the reason for this behaviour > of ansible: > My hosts file (part of it): > > [lb] > lb[1:2] > > lb3 > > The result in command line: > ansible -a whoami lb > lb1 | success | rc=0 >> > root > > lb2 | success | rc=0 >> > root > > lb3 | success | rc=0 >> > root > > In my opinion the above command should check only lb1 and lb2, as lb3 is > not the part of the lb group. > Can anyone tell me why it's catching the 3rd lb node? > Strange thing is if I'm removing the lb3 from it's current place in the > hosts file and placing it somewhere else, then the issue is gone, for > example: > [lb] > lb[1:2] > > [payment] > payment[1:3] > > lb3 > > I think parsing the hosts file is wrong in ansible in this case. > Thanks. > > -- > 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/94317858-c94c-4969-a7b8-fbbcbadfed99%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/94317858-c94c-4969-a7b8-fbbcbadfed99%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/CAOBFM95Rp2%2B5EjcxMDCnPpO1GUAUc-LfELkiK%2BWMMzQ0UB0fiw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
