Add tripleo_states to default callback whitelist

tripleo_states will be a useful callback to print out informations about
a deployment state (e.g. if a node failed but was ignored because of
max_failed_percentage).

Depends-On: https://review.opendev.org/735962
Change-Id: I82f4945bf1178fad1ff511c994518008f308d12e
(cherry picked from commit c1dad1ced1)
This commit is contained in:
Emilien Macchi 2020-06-16 13:46:21 -04:00
parent 25bb1f2e81
commit d270b07f80
2 changed files with 4 additions and 3 deletions

View File

@ -61,7 +61,8 @@ 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(['tripleo_dense', 'tripleo_profile_tasks'])
callbacks_whitelist = ','.join(['tripleo_dense', 'tripleo_profile_tasks',
'tripleo_states'])
action_plugins_path = (
'~/.ansible/plugins/action:'
'/usr/share/ansible/plugins/action:'
@ -421,7 +422,7 @@ class AnsiblePlaybookAction(base.TripleOAction):
# the whitelist could be collected from multiple
# arguments if we find a use case for it
'ANSIBLE_CALLBACK_WHITELIST':
'tripleo_dense,tripleo_profile_tasks',
'tripleo_dense,tripleo_profile_tasks,tripleo_states',
'ANSIBLE_STDOUT_CALLBACK': 'tripleo_dense',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT':
six.text_type(self.profile_tasks_limit),

View File

@ -72,7 +72,7 @@ class AnsiblePlaybookActionTest(base.TestCase):
'ANSIBLE_LOCAL_TEMP': action.work_dir,
'ANSIBLE_CONFIG': ansible_config_path,
'ANSIBLE_CALLBACK_WHITELIST':
'tripleo_dense,tripleo_profile_tasks',
'tripleo_dense,tripleo_profile_tasks,tripleo_states',
'ANSIBLE_STDOUT_CALLBACK': 'tripleo_dense',
'PROFILE_TASKS_TASK_OUTPUT_LIMIT': '20',
}