mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 19:20:05 -03:30
set_stats fails in callback plugin on isolated node #2123
Signed-off-by: U-AD001\U317788 <U317788@L7668YGH2.AD001.InfoFTPS.COM>
This commit is contained in:
committed by
Ryan Petrello
parent
95a9e1a7b6
commit
a562d9ae0c
@@ -308,7 +308,8 @@ class BaseCallbackModule(CallbackBase):
|
|||||||
if custom_artifact_data:
|
if custom_artifact_data:
|
||||||
# create the directory for custom stats artifacts to live in (if it doesn't exist)
|
# create the directory for custom stats artifacts to live in (if it doesn't exist)
|
||||||
custom_artifacts_dir = os.path.join(os.getenv('AWX_PRIVATE_DATA_DIR'), 'artifacts')
|
custom_artifacts_dir = os.path.join(os.getenv('AWX_PRIVATE_DATA_DIR'), 'artifacts')
|
||||||
os.makedirs(custom_artifacts_dir, mode=stat.S_IXUSR + stat.S_IWUSR + stat.S_IRUSR)
|
if not os.path.isdir(custom_artifacts_dir):
|
||||||
|
os.makedirs(custom_artifacts_dir, mode=stat.S_IXUSR + stat.S_IWUSR + stat.S_IRUSR)
|
||||||
|
|
||||||
custom_artifacts_path = os.path.join(custom_artifacts_dir, 'custom')
|
custom_artifacts_path = os.path.join(custom_artifacts_dir, 'custom')
|
||||||
with codecs.open(custom_artifacts_path, 'w', encoding='utf-8') as f:
|
with codecs.open(custom_artifacts_path, 'w', encoding='utf-8') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user