So in order to access this var/register from server01, I could do something
like in playbook-01.yml:
---
- hosts: "{{ hostvars['server01']['proddbhost'] }}"
(When I do that I get "ERROR! 'hostvars' is undefined"
On Friday, May 20, 2016 at 8:30:48 AM UTC-5, Brian Coca wrote:
>
> vars don't they are play specific, host vars (facts and registered vars)
> do persist, but they are associated to the specific host.
>
> So in subsequent plays you might need to do
> hostvars['server01']['timestamp'] to get the var if they are not also
> targetting server01.
>
>
>
> ----------
> 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/1713b3c1-79ec-43fc-9224-dd55c521974f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.