mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
fix precedence issue with facts and vars (#32302)
avoid making gathered facts high precedence, only set_fact is supposed to be.
vars set via set_fact with cacheable are higher precedence than plain facts.
Previously (after 6fbd0a8bb5
) regular facts would end up with a
higher precedence than host or play vars, but they should not be. Facts were getting added to 'non_persistent_facts' (equivalent to 'register' vars) which is higher precedence than facts should be.
added 'cacheable set_facts' to precedence docs
'ansible_facts_cacheable' -> '_ansible_facts_cacheable' (made 'private')
This commit is contained in:
parent
d1e55551e9
commit
41685fb516
3 changed files with 8 additions and 7 deletions
|
@ -54,5 +54,5 @@ class ActionModule(ActionBase):
|
|||
|
||||
result['changed'] = False
|
||||
result['ansible_facts'] = facts
|
||||
result['ansible_facts_cacheable'] = cacheable
|
||||
result['_ansible_facts_cacheable'] = cacheable
|
||||
return result
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue