mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
restore proot for inventory updates
- in the past, inv. update jobs called `awx-manage inventory_update` which took care of setting up process isolation - at this point, though, inv. update jobs call runner / ansible-inventory directly, so we need another way to put process isolation in place - thankfully, there was already support for providing process isolation for other types of jobs (namely JT Jobs, Project Updates and Ad Hoc commands) - so, we do what those other jobs do and override the stub for should_use_proot (which by default returns false) so that it keys off of the `AWX_PROOT_ENABLED` setting
This commit is contained in:
parent
4bdc488fe7
commit
a8710bf2f1
@ -2461,6 +2461,12 @@ class RunInventoryUpdate(BaseTask):
|
||||
event_model = InventoryUpdateEvent
|
||||
event_data_key = 'inventory_update_id'
|
||||
|
||||
def should_use_proot(self, inventory_update):
|
||||
'''
|
||||
Return whether this task should use proot.
|
||||
'''
|
||||
return getattr(settings, 'AWX_PROOT_ENABLED', False)
|
||||
|
||||
@property
|
||||
def proot_show_paths(self):
|
||||
return [settings.AWX_ANSIBLE_COLLECTIONS_PATHS]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user