Hostvars cannot access facts:, or at least, they previously could not. I'll
draw up some additional diagnostics on the state of affairs in the gist on
#10859 (https://gist.github.com/rektide/c83208ccf4ab84638546) and provide
an update with whether there's inaccessible data or no.
Thanks for the reply, very much hope you are correct. I'm hugely in favor
of big changes, big overhauls, and I don't mind having to update my code at
all- so godspeed Ansible, hail hail 2.0!
On Tuesday, June 16, 2015 at 8:31:58 AM UTC-4, Brian Coca wrote:
>
> The supported way to access facts indirectly is {{
> hostvars[inventory_hostname]['myFact'] }}, this already gives you the
> ability you are asking for.
>
> The refactoring you mention fixed many problems with variables and
> exposed many more, this is part of why there is even further
> refactoring in v2. Specifically there were a few security issues
> caused specifically from facts bleeding into 'trusted' data, which
> means there are certain things we cannot really reverse.
>
> In any case, I'm not sure why you need a 2nd way to do so nor why
> there should be 2 features with 'parity' which really means the same
> feature. As to what was intended and not, 'hostvars' was created
> explicitly to allow access, 'vars' is an aftereffect of templating and
> how modules were defined, which was getting incorrectly updated in
> some scopes.
>
> If vars were the only way to access the data I would agree with you,
> but given that there is an explicit method of doing so already, I'm
> not inclined to do so.
>
--
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/e97ac957-e5e5-4cd6-b530-951d87d946a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.