Browse Source

Merge "Get UUID from ansible environment variables" into stable/train

changes/81/747881/1
Zuul 1 month ago
committed by Gerrit Code Review
parent
commit
e66bac6b73
2 changed files with 5 additions and 4 deletions
  1. +5
    -3
      callback_plugins/validation_json.py
  2. +0
    -1
      doc/source/_exts/generate_validations_doc.py

+ 5
- 3
callback_plugins/validation_json.py View File

@@ -20,7 +20,7 @@ __metaclass__ = type
import datetime
import json
import time
import os.path
import os

from functools import partial

@@ -75,7 +75,8 @@ class CallbackModule(CallbackBase):
'host': play.get_name(),
'validation_id': self.env['playbook_name'],
'validation_path': self.env['playbook_path'],
'id': str(play._uuid),
'id': (os.getenv('ANSIBLE_UUID') if os.getenv('ANSIBLE_UUID')
else str(play._uuid)),
'duration': {
'start': current_time()
}
@@ -147,7 +148,8 @@ class CallbackModule(CallbackBase):

log_file = "{}/{}_{}_{}.json".format(
VALIDATIONS_LOG_DIR,
self.results[0].get('play').get('id'),
(os.getenv('ANSIBLE_UUID') if os.getenv('ANSIBLE_UUID') else
self.results[0].get('play').get('id')),
self.env['playbook_name'],
self.current_time)



+ 0
- 1
doc/source/_exts/generate_validations_doc.py View File

@@ -103,7 +103,6 @@ Role documentation
name=validation['name'],
desc=validation['description'],
groups=', '.join(validation['groups']),
metadata=format_dict(validation['metadata']),
hosts=validation['hosts'],
parameters=format_dict(validation['parameters']),
roles=validation['roles']


Loading…
Cancel
Save