|
|
|
@ -528,16 +528,6 @@ class StrategyBase:
|
|
|
|
|
self._tqm.send_callback('v2_runner_item_on_ok', task_result)
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
if original_task.register:
|
|
|
|
|
host_list = self.get_task_hosts(iterator, original_host, original_task)
|
|
|
|
|
|
|
|
|
|
clean_copy = strip_internal_keys(module_response_deepcopy(task_result._result))
|
|
|
|
|
if 'invocation' in clean_copy:
|
|
|
|
|
del clean_copy['invocation']
|
|
|
|
|
|
|
|
|
|
for target_host in host_list:
|
|
|
|
|
self._variable_manager.set_nonpersistent_facts(target_host, {original_task.register: clean_copy})
|
|
|
|
|
|
|
|
|
|
# all host status messages contain 2 entries: (msg, task_result)
|
|
|
|
|
role_ran = False
|
|
|
|
|
if task_result.is_failed():
|
|
|
|
@ -718,6 +708,18 @@ class StrategyBase:
|
|
|
|
|
self._pending_handler_results -= 1
|
|
|
|
|
else:
|
|
|
|
|
self._pending_results -= 1
|
|
|
|
|
|
|
|
|
|
# register final results
|
|
|
|
|
if original_task.register:
|
|
|
|
|
host_list = self.get_task_hosts(iterator, original_host, original_task)
|
|
|
|
|
|
|
|
|
|
clean_copy = strip_internal_keys(module_response_deepcopy(task_result._result))
|
|
|
|
|
if 'invocation' in clean_copy:
|
|
|
|
|
del clean_copy['invocation']
|
|
|
|
|
|
|
|
|
|
for target_host in host_list:
|
|
|
|
|
self._variable_manager.set_nonpersistent_facts(target_host, {original_task.register: clean_copy})
|
|
|
|
|
|
|
|
|
|
if original_host.name in self._blocked_hosts:
|
|
|
|
|
del self._blocked_hosts[original_host.name]
|
|
|
|
|
|
|
|
|
@ -850,20 +852,20 @@ class StrategyBase:
|
|
|
|
|
group = self._inventory.groups[group_name]
|
|
|
|
|
for parent_group_name in parent_group_names:
|
|
|
|
|
parent_group = self._inventory.groups[parent_group_name]
|
|
|
|
|
parent_group.add_child_group(group)
|
|
|
|
|
new = parent_group.add_child_group(group)
|
|
|
|
|
if new and not changed:
|
|
|
|
|
changed = True
|
|
|
|
|
|
|
|
|
|
if real_host.name not in group.get_hosts():
|
|
|
|
|
group.add_host(real_host)
|
|
|
|
|
changed = True
|
|
|
|
|
if real_host not in group.get_hosts():
|
|
|
|
|
changed = group.add_host(real_host)
|
|
|
|
|
|
|
|
|
|
if group_name not in host.get_groups():
|
|
|
|
|
real_host.add_group(group)
|
|
|
|
|
changed = True
|
|
|
|
|
if group not in real_host.get_groups():
|
|
|
|
|
changed = real_host.add_group(group)
|
|
|
|
|
|
|
|
|
|
if changed:
|
|
|
|
|
self._inventory.reconcile_inventory()
|
|
|
|
|
|
|
|
|
|
return changed
|
|
|
|
|
result_item['changed'] = changed
|
|
|
|
|
|
|
|
|
|
def _copy_included_file(self, included_file):
|
|
|
|
|
'''
|
|
|
|
|