mirror of
https://github.com/ansible/awx.git
synced 2026-03-19 09:57:33 -02:30
Fix inventory updates when running inside of k8s
This commit is contained in:
@@ -1227,6 +1227,10 @@ class InventoryUpdate(UnifiedJob, InventorySourceOptions, JobNotificationMixin,
|
|||||||
null=True,
|
null=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_container_group_task(self):
|
||||||
|
return bool(self.instance_group and self.instance_group.is_container_group)
|
||||||
|
|
||||||
def _get_parent_field_name(self):
|
def _get_parent_field_name(self):
|
||||||
return 'inventory_source'
|
return 'inventory_source'
|
||||||
|
|
||||||
|
|||||||
@@ -2505,7 +2505,7 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
args.append(container_location)
|
args.append(container_location)
|
||||||
|
|
||||||
args.append('--output')
|
args.append('--output')
|
||||||
args.append(os.path.join('/runner', 'artifacts', 'output.json'))
|
args.append(os.path.join('/runner', 'artifacts', str(inventory_update.id), 'output.json'))
|
||||||
|
|
||||||
if os.path.isdir(source_location):
|
if os.path.isdir(source_location):
|
||||||
playbook_dir = container_location
|
playbook_dir = container_location
|
||||||
|
|||||||
Reference in New Issue
Block a user