On 15.05.2018 17:51, 'deewon' via Ansible Project wrote:
Trying to do something that seems straightforward but can't work out why
its failing.

I'm simply trying to pass a random server within a  group whose name is
supplied at execution time to a task using "delegate_to" and
"--extra-vars" but it doesn't like it i.e


  delegate_to: {{ groups.v_grp | random }}

In addition to Brian answer you also need to write this as

  delegate_to: {{ groups[v_grp] | random }}

--
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/801288c578c0097b91be41d18bd05998%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to