diff --git a/tripleo_common/actions/ansible.py b/tripleo_common/actions/ansible.py index 6f92c78a4..2f107e722 100644 --- a/tripleo_common/actions/ansible.py +++ b/tripleo_common/actions/ansible.py @@ -60,7 +60,7 @@ def write_default_ansible_cfg(work_dir, '/usr/share/ansible/tripleo-plugins/callback:' '/usr/share/ansible/plugins/callback:' '%s/callback_plugins' % constants.DEFAULT_VALIDATIONS_BASEDIR) - callbacks_whitelist = ','.join(['profile_tasks']) + callbacks_whitelist = ','.join(['tripleo', 'profile_tasks']) action_plugins_path = ( '~/.ansible/plugins/action:' '/usr/share/ansible/plugins/action:' @@ -90,6 +90,7 @@ def write_default_ansible_cfg(work_dir, config.set('defaults', 'library', modules_path) config.set('defaults', 'callback_plugins', callbacks_path) config.set('defaults', 'callback_whitelist', callbacks_whitelist) + config.set('defaults', 'stdout_callback', 'tripleo') config.set('defaults', 'action_plugins', action_plugins_path) config.set('defaults', 'lookup_plugins', lookups_path) config.set('defaults', 'filter_plugins', filter_plugins_path) @@ -597,7 +598,8 @@ class AnsiblePlaybookAction(base.TripleOAction): env_variables.update({ # the whitelist could be collected from multiple # 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': six.text_type(self.profile_tasks_limit), }) diff --git a/tripleo_common/tests/actions/test_ansible.py b/tripleo_common/tests/actions/test_ansible.py index 320d5450d..45697a688 100644 --- a/tripleo_common/tests/actions/test_ansible.py +++ b/tripleo_common/tests/actions/test_ansible.py @@ -113,7 +113,8 @@ class AnsiblePlaybookActionTest(base.TestCase): 'HOME': action.work_dir, 'ANSIBLE_LOCAL_TEMP': action.work_dir, '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': '0', } python_version = sys.version_info.major