From 70a8d2c4e2a3669e9a7fbbe9dcd55a549c46390c Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 2 Jun 2020 07:25:47 -0600 Subject: [PATCH] Exclude callbacks env vars for ceph-ansible We're working on changing the default callbacks for tripleo but we don't want to use them when invoking ceph-ansible. We should exclude the callbacks that were used in the calling env and specifically set the regular callbacks. Change-Id: I6ab1709d2e0e0d60d2401281aa3bb88cfea6e5d4 Related-Bug: #1881670 (cherry picked from commit 64313d1f3534d20b4ba54ad68629c912a1ed2d9c) --- tripleo_ansible/roles/tripleo-ceph-common/tasks/main.yml | 2 +- tripleo_ansible/roles/tripleo-ceph-run-ansible/tasks/main.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tripleo_ansible/roles/tripleo-ceph-common/tasks/main.yml b/tripleo_ansible/roles/tripleo-ceph-common/tasks/main.yml index a07c8b41f..b0d68d4f9 100644 --- a/tripleo_ansible/roles/tripleo-ceph-common/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-ceph-common/tasks/main.yml @@ -36,7 +36,7 @@ - when: ceph_ansible_inherits_calling_ansible_environment block: - name: get all ansible environment variables - shell: "env | grep ^ANSIBLE_" + shell: "env | grep ^ANSIBLE_ | grep -v CALLBACK" register: env_shell_output failed_when: false diff --git a/tripleo_ansible/roles/tripleo-ceph-run-ansible/tasks/main.yml b/tripleo_ansible/roles/tripleo-ceph-run-ansible/tasks/main.yml index 7c57db3c4..db2e1bbe6 100644 --- a/tripleo_ansible/roles/tripleo-ceph-run-ansible/tasks/main.yml +++ b/tripleo_ansible/roles/tripleo-ceph-run-ansible/tasks/main.yml @@ -36,6 +36,8 @@ - ANSIBLE_REMOTE_TEMP=/tmp/ceph_ansible_tmp - ANSIBLE_FORKS=25 - ANSIBLE_GATHER_TIMEOUT=60 + - ANSIBLE_CALLBACK_WHITELIST=profile_tasks + - ANSIBLE_STDOUT_CALLBACK=default - "{{ calling_ansible_environment_variables|join(' ') }}" - "{{ ceph_ansible_environment_variables|join(' ') }}" - ansible-playbook