> I was under the impression that groups was at the "current playbook" scope,
> as its available for new plays in the same playbook (operating on different
> hosts pattern).
>
groups is available to every play but only once hosts/inventory is
loaded, which is not the case with the - hosts: directive.

>
> The reason I have the ternary condition is I'm unable to pass the new host
> pattern to "cli_hosts", if I could do that, than the pattern expression will
> be simpler. Is there a way I can do that? that is pass the host pattern via
> include.
>
I don't understand, if you are passing cli_hosts in the command line
it should be easy enough to pass a pattern -e
'cli_hosts=group1:!group2'.

As for the play needing to target new_hosts, just leave it at that, if
there are no new_hosts ti should be skipped.

-- 
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/CAJ5XC8kB_u-qw9sgdY9bLyPbBHJU97aqDc-bpius3hYAxqGCmw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to