mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Fix pathing issue with custom credentials
also fix some minor flake8 issues
This commit is contained in:
parent
6e2010ca40
commit
73418e41f3
@ -564,7 +564,12 @@ class CredentialType(CommonModelNameNotUnique):
|
||||
|
||||
if extra_vars:
|
||||
path = build_extra_vars_file(extra_vars, private_data_dir)
|
||||
args.extend(['-e', '@%s' % path])
|
||||
# FIXME: develop some better means of referencing paths inside containers
|
||||
container_path = os.path.join(
|
||||
'/runner',
|
||||
os.path.basename(path)
|
||||
)
|
||||
args.extend(['-e', '@%s' % container_path])
|
||||
|
||||
|
||||
class ManagedCredentialType(SimpleNamespace):
|
||||
|
||||
@ -1414,9 +1414,10 @@ class BaseTask(object):
|
||||
cwd = self.build_cwd(self.instance, private_data_dir)
|
||||
resource_profiling_params = self.build_params_resource_profiling(self.instance,
|
||||
private_data_dir)
|
||||
process_isolation_params = self.build_params_process_isolation(self.instance,
|
||||
private_data_dir,
|
||||
cwd)
|
||||
# TODO: Remove if fully replaced with containerized runs
|
||||
# process_isolation_params = self.build_params_process_isolation(self.instance,
|
||||
# private_data_dir,
|
||||
# cwd)
|
||||
execution_environment_params = self.build_execution_environment_params(self.instance)
|
||||
env = self.build_env(self.instance, private_data_dir, isolated,
|
||||
private_data_files=private_data_files)
|
||||
@ -2534,10 +2535,9 @@ class RunInventoryUpdate(BaseTask):
|
||||
are accomplished by the inventory source injectors (in this method)
|
||||
or custom credential type injectors (in main run method).
|
||||
"""
|
||||
base_env = super(RunInventoryUpdate, self).build_env(inventory_update,
|
||||
private_data_dir,
|
||||
isolated,
|
||||
private_data_files=private_data_files)
|
||||
base_env = super(RunInventoryUpdate, self).build_env(
|
||||
inventory_update, private_data_dir, isolated,
|
||||
private_data_files=private_data_files)
|
||||
# TODO: this is able to run by turning off isolation
|
||||
# the goal is to run it a container instead
|
||||
env = dict(os.environ.items())
|
||||
@ -3035,9 +3035,9 @@ class RunSystemJob(BaseTask):
|
||||
return path
|
||||
|
||||
def build_env(self, instance, private_data_dir, isolated=False, private_data_files=None):
|
||||
base_env = super(RunSystemJob, self).build_env(instance, private_data_dir,
|
||||
isolated=isolated,
|
||||
private_data_files=private_data_files)
|
||||
base_env = super(RunSystemJob, self).build_env(
|
||||
instance, private_data_dir, isolated=isolated,
|
||||
private_data_files=private_data_files)
|
||||
# TODO: this is able to run by turning off isolation
|
||||
# the goal is to run it a container instead
|
||||
env = dict(os.environ.items())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user