diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index 25b2791577..c93626a7ed 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -377,9 +377,9 @@ class StrategyBase: facts = result[4] for target_host in host_list: if task.action == 'set_fact': - self._variable_manager.set_nonpersistent_facts(target_host, facts) + self._variable_manager.set_nonpersistent_facts(target_host, facts.copy()) else: - self._variable_manager.set_host_facts(target_host, facts) + self._variable_manager.set_host_facts(target_host, facts.copy()) elif result[0].startswith('v2_runner_item') or result[0] == 'v2_runner_retry': self._tqm.send_callback(result[0], result[1]) elif result[0] == 'v2_on_file_diff':