From f431149a100b8f23905186c547a2d22e8a0e8765 Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Thu, 4 Mar 2021 07:51:31 -0700 Subject: [PATCH] Revert "Revert "Add environment variables for better var handling"" This reverts commit 6aa5a92e353ee6c5af87ad0c8efd6839f833626b. We'd like to disable the fact var inject but we need to address the ceph-ansible execution issues. This change now has depends-on for CI coverage and a workaround for ceph-ansible requirements until ceph-ansible can be updated. Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/779504 Change-Id: Ia67f51097e7853a5810217a3effc37c45b010f3c Related-Bug: #1915761 (cherry picked from commit c6380a607343df585fa18810e83ff65f1cf3d269) --- tripleoclient/utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tripleoclient/utils.py b/tripleoclient/utils.py index 31c7b3ba7..5b21451d0 100644 --- a/tripleoclient/utils.py +++ b/tripleoclient/utils.py @@ -574,6 +574,11 @@ def run_ansible_playbook(playbook, inventory, workdir, playbook_dir=None, env['ANSIBLE_TRANSPORT'] = connection env['ANSIBLE_CACHE_PLUGIN_TIMEOUT'] = 7200 + # Set var handling for better performance + env['ANSIBLE_INJECT_FACT_VARS'] = False + env['ANSIBLE_VARS_PLUGIN_STAGE'] = 'inventory' + env['ANSIBLE_GATHER_SUBSET'] = '!all,min' + if connection == 'local': env['ANSIBLE_PYTHON_INTERPRETER'] = sys.executable