mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
on host callback, upate dynamic inv only once
* During a job template launch via the host callback launch feature, when the host launching the job template is not found; we try to launch associated dyn inv updates to pick up the host. Then the inv is searched again for the host. If the host is found, then the jt is launched. This fix carries forward the feature that prevents the dyn inv update with cache timeout of 0 from being re-launched with the new task manager.
This commit is contained in:
@@ -230,7 +230,12 @@ class TaskManager():
|
||||
dependencies.append(project_task)
|
||||
# Inventory created 2 seconds behind job
|
||||
|
||||
inventory_sources_already_updated = task.get_inventory_sources_already_updated()
|
||||
|
||||
for inventory_source_task in self.graph.get_inventory_sources(task['inventory_id']):
|
||||
if inventory_source_task['id'] in inventory_sources_already_updated:
|
||||
print("Inventory already updated")
|
||||
continue
|
||||
if self.graph.should_update_related_inventory_source(task, inventory_source_task['id']):
|
||||
inventory_task = self.create_inventory_update(task, inventory_source_task)
|
||||
dependencies.append(inventory_task)
|
||||
|
||||
Reference in New Issue
Block a user