mirror of
https://github.com/ansible/awx.git
synced 2026-03-02 17:28:51 -03:30
Merge pull request #3482 from chrismeyersfsu/fix-iso_ident
do not generate a random ident Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
@@ -4,7 +4,6 @@ import shutil
|
|||||||
import stat
|
import stat
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import uuid
|
|
||||||
import logging
|
import logging
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
|
||||||
@@ -373,7 +372,7 @@ class IsolatedManager(object):
|
|||||||
if os.path.exists(facts_path):
|
if os.path.exists(facts_path):
|
||||||
shutil.rmtree(facts_path)
|
shutil.rmtree(facts_path)
|
||||||
|
|
||||||
def run(self, instance, private_data_dir, playbook, event_data_key):
|
def run(self, instance, private_data_dir, playbook, event_data_key, ident=None):
|
||||||
"""
|
"""
|
||||||
Run a job on an isolated host.
|
Run a job on an isolated host.
|
||||||
|
|
||||||
@@ -388,7 +387,7 @@ class IsolatedManager(object):
|
|||||||
representing the status and return code of the isolated
|
representing the status and return code of the isolated
|
||||||
`ansible-playbook` run.
|
`ansible-playbook` run.
|
||||||
"""
|
"""
|
||||||
self.ident = str(uuid.uuid4())
|
self.ident = ident
|
||||||
self.event_data_key = event_data_key
|
self.event_data_key = event_data_key
|
||||||
self.instance = instance
|
self.instance = instance
|
||||||
self.host = instance.execution_node
|
self.host = instance.execution_node
|
||||||
|
|||||||
@@ -1183,7 +1183,8 @@ class BaseTask(object):
|
|||||||
status, rc = manager_instance.run(self.instance,
|
status, rc = manager_instance.run(self.instance,
|
||||||
private_data_dir,
|
private_data_dir,
|
||||||
playbook,
|
playbook,
|
||||||
event_data_key=self.event_data_key)
|
event_data_key=self.event_data_key,
|
||||||
|
ident=str(self.instance.pk))
|
||||||
else:
|
else:
|
||||||
res = ansible_runner.interface.run(**params)
|
res = ansible_runner.interface.run(**params)
|
||||||
status = res.status
|
status = res.status
|
||||||
|
|||||||
Reference in New Issue
Block a user