On 04/28/14 19:03, Brian Coca wrote:
> it is not supposed to work at all. ​which host or group would it look
> at to set the hosts?
>
> you might want to look at group_by to do dynamic groups based on
> variables that can be used in subsequent plays (in same run).
> --
> 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]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CADn%2BHsz-UGtZ7aT5am6Aa5QxDkpHdxL6h4FMi2FuGNewn1b8_A%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CADn%2BHsz-UGtZ7aT5am6Aa5QxDkpHdxL6h4FMi2FuGNewn1b8_A%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.
I actually got to workaround this by making the assumption that the
first node in the "mycluster.example.org" group is the master node. So,
the following hosts patterns work:
# match master node
- hosts: "{{ target + '_nodes' }}[0]"
# match other nodes
- hosts: "{{ target + '_nodes' }}:!{{ target + '_nodes' }}[0]"
Nevertheless, I think it would not hurt a feature addition to support
host/group vars in the hosts patterns. It would not be something that we
should suggest to users, but perhaps it would come handy in some
scenarios that involve data-driven host matches. What do you think?
--
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/535E899B.5020204%40yahoo.gr.
For more options, visit https://groups.google.com/d/optout.