Merge "Switch to tripleo stdout callback"

This commit is contained in:
Zuul 2020-05-29 06:36:08 +00:00 committed by Gerrit Code Review
commit fe8ab8cb92
2 changed files with 6 additions and 3 deletions

View File

@ -61,7 +61,7 @@ def write_default_ansible_cfg(work_dir,
'/usr/share/ansible/tripleo-plugins/callback:' '/usr/share/ansible/tripleo-plugins/callback:'
'/usr/share/ansible/plugins/callback:' '/usr/share/ansible/plugins/callback:'
'%s/callback_plugins' % constants.DEFAULT_VALIDATIONS_BASEDIR) '%s/callback_plugins' % constants.DEFAULT_VALIDATIONS_BASEDIR)
callbacks_whitelist = ','.join(['profile_tasks']) callbacks_whitelist = ','.join(['tripleo', 'profile_tasks'])
action_plugins_path = ( action_plugins_path = (
'~/.ansible/plugins/action:' '~/.ansible/plugins/action:'
'/usr/share/ansible/plugins/action:' '/usr/share/ansible/plugins/action:'
@ -91,6 +91,7 @@ def write_default_ansible_cfg(work_dir,
config.set('defaults', 'library', modules_path) config.set('defaults', 'library', modules_path)
config.set('defaults', 'callback_plugins', callbacks_path) config.set('defaults', 'callback_plugins', callbacks_path)
config.set('defaults', 'callback_whitelist', callbacks_whitelist) config.set('defaults', 'callback_whitelist', callbacks_whitelist)
config.set('defaults', 'stdout_callback', 'tripleo')
config.set('defaults', 'action_plugins', action_plugins_path) config.set('defaults', 'action_plugins', action_plugins_path)
config.set('defaults', 'lookup_plugins', lookups_path) config.set('defaults', 'lookup_plugins', lookups_path)
config.set('defaults', 'filter_plugins', filter_plugins_path) config.set('defaults', 'filter_plugins', filter_plugins_path)
@ -419,7 +420,8 @@ class AnsiblePlaybookAction(base.TripleOAction):
env_variables.update({ env_variables.update({
# the whitelist could be collected from multiple # the whitelist could be collected from multiple
# arguments if we find a use case for it # arguments if we find a use case for it
'ANSIBLE_CALLBACK_WHITELIST': 'profile_tasks', 'ANSIBLE_CALLBACK_WHITELIST': 'tripleo,profile_tasks',
'ANSIBLE_STDOUT_CALLBACK': 'tripleo',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT': 'PROFILE_TASKS_TASK_OUTPUT_LIMIT':
six.text_type(self.profile_tasks_limit), six.text_type(self.profile_tasks_limit),
}) })

View File

@ -71,7 +71,8 @@ class AnsiblePlaybookActionTest(base.TestCase):
'HOME': action.work_dir, 'HOME': action.work_dir,
'ANSIBLE_LOCAL_TEMP': action.work_dir, 'ANSIBLE_LOCAL_TEMP': action.work_dir,
'ANSIBLE_CONFIG': ansible_config_path, 'ANSIBLE_CONFIG': ansible_config_path,
'ANSIBLE_CALLBACK_WHITELIST': 'profile_tasks', 'ANSIBLE_CALLBACK_WHITELIST': 'tripleo,profile_tasks',
'ANSIBLE_STDOUT_CALLBACK': 'tripleo',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT': '20', 'PROFILE_TASKS_TASK_OUTPUT_LIMIT': '20',
} }
python_version = sys.version_info.major python_version = sys.version_info.major