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.

-- 
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/CAJ5XC8%3DvDVkwCbzcODz0Rka5ZM9RZZWhDY4C%3DPbTRDhSPGqyEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to