On 30.11.2016 11:50, Pieter Voet wrote:
Hi Kai,
you said :
Knowledge of members in group1 you find with groups['group1']
hostvars[groups['group1'][0]]['result']
actually, the 'group1' group contains a lot of hosts.. There is no
quarantee
that the first entry in that array actually is the host that applies to
my
playbook.
Then I don't understand what you are trying to achieve, your testcase
must be flawed.
Every host in group1 will run that task, so every host in the group will
have a "result" variable set.
You must choose at some level who is going to be the "global" one.
--
Kai Stian Olstad
--
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/47c4495663ab9207692a78f531b8c34d%40olstad.com.
For more options, visit https://groups.google.com/d/optout.