From 541949772682535a2fa3bedbb4306be021253c63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Han?= Date: Fri, 14 Dec 2018 11:14:30 +0100 Subject: [PATCH] test: use yaml stdout callback MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This provides a much more readable output for tasks. It'll be easier to debug traces. Signed-off-by: Sébastien Han --- ansible.cfg | 5 +++-- tox.ini | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/ansible.cfg b/ansible.cfg index 74ee1b5a0..a2b970de2 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -9,7 +9,7 @@ roles_path = ./roles # Be sure the user running Ansible has permissions on the logfile log_path = /var/log/ansible.log -forks = 20 +forks = 20 host_key_checking = False gathering = smart fact_caching = jsonfile @@ -17,6 +17,7 @@ fact_caching_connection = $HOME/ansible/facts fact_caching_timeout = 600 nocows = 1 callback_whitelist = profile_tasks +stdout_callback = yaml # Disable them in the context of https://review.openstack.org/#/c/469644 retry_files_enabled = False @@ -30,7 +31,7 @@ timeout = 60 # see: https://github.com/ansible/ansible/issues/11536 control_path = %(directory)s/%%h-%%r-%%p ssh_args = -o ControlMaster=auto -o ControlPersist=600s -pipelining = True +pipelining = True # Option to retry failed ssh executions if the failure is encountered in ssh itself retries = 10 diff --git a/tox.ini b/tox.ini index 69ea0df66..61a64b553 100644 --- a/tox.ini +++ b/tox.ini @@ -19,8 +19,8 @@ setenv= ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_WHITELIST = profile_tasks - # only available for ansible >= 2.2 - ANSIBLE_STDOUT_CALLBACK = debug + # only available for ansible >= 2.5 + ANSIBLE_STDOUT_CALLBACK = yaml deps= -r{toxinidir}/tests/requirements.txt changedir={toxinidir}/tests/functional/centos/7/infra_lv_create commands= @@ -203,8 +203,8 @@ setenv= ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback ANSIBLE_CALLBACK_WHITELIST = profile_tasks - # only available for ansible >= 2.2 - ANSIBLE_STDOUT_CALLBACK = debug + # only available for ansible >= 2.5 + ANSIBLE_STDOUT_CALLBACK = yaml ansible2.2: DELEGATE_FACTS_HOST = False docker_cluster: PLAYBOOK = site-docker.yml.sample docker_cluster_collocation: PLAYBOOK = site-docker.yml.sample -- 2.47.3