mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 17:37:30 -02:30
Change the artifact to also capture the actual envvars data
This commit is contained in:
@@ -189,12 +189,12 @@ class IsolatedManager(object):
|
|||||||
extravars=extravars)
|
extravars=extravars)
|
||||||
status, rc = runner_obj.status, runner_obj.rc
|
status, rc = runner_obj.status, runner_obj.rc
|
||||||
if self.check_callback is not None:
|
if self.check_callback is not None:
|
||||||
command_path = self.path_to('artifacts', self.ident, 'command')
|
config_path = self.path_to('artifacts', self.ident, 'config')
|
||||||
# If the command artifact has been synced back, update the model
|
# If the configuration artifact has been synced back, update the model
|
||||||
if os.path.exists(command_path):
|
if os.path.exists(config_path):
|
||||||
with open(command_path, 'r') as f:
|
with open(config_path, 'r') as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
self.check_callback(data['command'], data['cwd'], self.runner_params['envvars'].copy())
|
self.check_callback(data)
|
||||||
self.consume_events(dispatcher)
|
self.consume_events(dispatcher)
|
||||||
|
|
||||||
last_check = time.time()
|
last_check = time.time()
|
||||||
|
|||||||
@@ -1077,14 +1077,14 @@ class BaseTask(object):
|
|||||||
self.instance = self.update_model(self.instance.pk, job_args=json.dumps(runner_config.command),
|
self.instance = self.update_model(self.instance.pk, job_args=json.dumps(runner_config.command),
|
||||||
job_cwd=runner_config.cwd, job_env=job_env)
|
job_cwd=runner_config.cwd, job_env=job_env)
|
||||||
|
|
||||||
def check_handler(self, command, cwd, env):
|
def check_handler(self, config):
|
||||||
'''
|
'''
|
||||||
IsolatedManager callback triggered by the repeated checks of the isolated node
|
IsolatedManager callback triggered by the repeated checks of the isolated node
|
||||||
'''
|
'''
|
||||||
self.instance = self.update_model(self.instance.pk,
|
self.instance = self.update_model(self.instance.pk,
|
||||||
job_args=command,
|
job_args=json.dumps(config['command']),
|
||||||
job_cwd=cwd,
|
job_cwd=config['cwd'],
|
||||||
job_env=build_safe_env(env))
|
job_env=config['env'])
|
||||||
|
|
||||||
|
|
||||||
@with_path_cleanup
|
@with_path_cleanup
|
||||||
|
|||||||
Reference in New Issue
Block a user