mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 21:05:03 -02:30
Change the artifact file convention for isolated nodes to 'command'
since that's what landed in the ansible-runner PR.
This commit is contained in:
@@ -39,7 +39,7 @@ class IsolatedManager(object):
|
|||||||
self.check_callback = check_callback
|
self.check_callback = check_callback
|
||||||
self.idle_timeout = max(60, 2 * settings.AWX_ISOLATED_CONNECTION_TIMEOUT)
|
self.idle_timeout = max(60, 2 * settings.AWX_ISOLATED_CONNECTION_TIMEOUT)
|
||||||
self.started_at = None
|
self.started_at = None
|
||||||
self.captured_config_artifact = False
|
self.captured_command_artifact = False
|
||||||
|
|
||||||
def build_runner_params(self, hosts, verbosity=1):
|
def build_runner_params(self, hosts, verbosity=1):
|
||||||
env = dict(os.environ.items())
|
env = dict(os.environ.items())
|
||||||
@@ -190,15 +190,15 @@ 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 and not self.captured_config_artifact:
|
if self.check_callback is not None and not self.captured_command_artifact:
|
||||||
config_path = self.path_to('artifacts', self.ident, 'config')
|
command_path = self.path_to('artifacts', self.ident, 'command')
|
||||||
# If the configuration artifact has been synced back, update the model
|
# If the configuration artifact has been synced back, update the model
|
||||||
if os.path.exists(config_path):
|
if os.path.exists(command_path):
|
||||||
try:
|
try:
|
||||||
with open(config_path, 'r') as f:
|
with open(command_path, 'r') as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
self.check_callback(data)
|
self.check_callback(data)
|
||||||
self.captured_config_artifact = True
|
self.captured_command_artifact = True
|
||||||
except json.decoder.JSONDecodeError: # Just in case it's not fully here yet.
|
except json.decoder.JSONDecodeError: # Just in case it's not fully here yet.
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user