A couple of clarifications, these are important when you hit the corner case in which it matters:
- its not 'run on the first host in play/inventory' its 'run on the first host that reaches the task' which means that hosts that fail and/or are removed in previous tasks are not considered. Normally (in the absence of failure) this does mean the first host in play/inventory, changing to other strategies can affect this. - it is 'mostly' equivalent to `when: inventory_hostname == ansible_play_batch.0` but there is one major difference, other hosts are not 'skipped', they are all given the same status/return from the single execution. The feature should really be named 'only_first_host_tries_to_run_and_applies_status_to_rest'. To make it work as 'run_first_host_that_matches_when' would make the part of applying the status to all hosts a lot more difficult to do sanely ... do we set 'skipped' for the ones we skipped? do we set same status for all hosts? At this point I don't see us modifying the feature (maybe clarifying docs?), but I'm open to create a new set of keywords that allows for the difference in range of behaviors not already available via conditional construction. -- ---------- Brian Coca -- 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/CACVha7e2HFYBmMjiXTU83gO0N-XErCQAGVy2cz3dMHtgsWY9HQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
