mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Fix some bugs related to facts/nonpersistent-facts cache split
Fixes #12313
This commit is contained in:
@@ -267,7 +267,7 @@ class StrategyBase:
|
||||
return v
|
||||
|
||||
var_value = _wrap_var(var_value)
|
||||
self._variable_manager.set_host_facts(host, {var_name: var_value})
|
||||
self._variable_manager.set_nonpersistent_facts(host, {var_name: var_value})
|
||||
|
||||
elif result[0] in ('set_host_var', 'set_host_facts'):
|
||||
host = result[1]
|
||||
@@ -293,7 +293,10 @@ class StrategyBase:
|
||||
self._variable_manager.set_host_variable(target_host, var_name, var_value)
|
||||
elif result[0] == 'set_host_facts':
|
||||
facts = result[4]
|
||||
self._variable_manager.set_host_facts(target_host, facts)
|
||||
if task.action == 'set_fact':
|
||||
self._variable_manager.set_nonpersistent_facts(target_host, facts)
|
||||
else:
|
||||
self._variable_manager.set_host_facts(target_host, facts)
|
||||
|
||||
else:
|
||||
raise AnsibleError("unknown result message received: %s" % result[0])
|
||||
|
||||
Reference in New Issue
Block a user