OK, redefining my testcase then :
>
> groupall = { host_a, host_b, host_c }
>
group1 = { host_x, host_y, host_a, host_z }
group2 = { host_b, host_c }
>
> ---
> - hosts: group1
> tasks:
> - name: get the variable value
> whatever_module: arg=arg_a
> register: result
>
> - hosts: group2
> tasks:
> - debug: var="{{result}}"
>
> The playbook is started with the '--limit groupall' argument.
>
> Yes, every host in 'group1' will have access to the result.
What I want is to access that result in the other play ( for 'group2' ).
( BTW, I understand that the first play will only be executed on 'host_a'
since that's the only host that is in 'groupall'...)
For now I'll call it a playbook 'global' variable... Like an 'extra_var'
, but then settable from within a play.
Thanks !
--
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/d0494030-664f-42c3-9a97-7f637c316bd4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.