From b9a164582ea64caa2dca3a4f4b1aad539a3ec5eb Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Fri, 19 Feb 2021 07:39:40 -0700 Subject: [PATCH] Drop inject_facts_as_vars This setting stops ansible from converting ansible_fact items into top level ansible_* vars. This has a huge impact on performance as this is performed at the end of every task execution. Depends-On: https://review.opendev.org/c/openstack/tripleo-heat-templates/+/782550 Change-Id: I1a3c0d31cdb4a644cb950ca59c83bfcb051dc39d (cherry picked from commit 16bc02326be62e9df328f290a1e06f3045c54957) --- tripleo_common/actions/ansible.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tripleo_common/actions/ansible.py b/tripleo_common/actions/ansible.py index 46154e8aa..cc1bc1ce1 100644 --- a/tripleo_common/actions/ansible.py +++ b/tripleo_common/actions/ansible.py @@ -132,6 +132,8 @@ def write_default_ansible_cfg(work_dir, # NOTE(mwhahaha): only gather the bare minimum facts because this has # direct impact on how fast ansible can go. config.set('defaults', 'gather_subset', '!all,min') + # NOTE(mwhahaha): this significantly affects performation per ansible#73654 + config.set('defaults', 'inject_facts_as_vars', 'false') # Set the pull interval to lower CPU overhead config.set('defaults', 'internal_poll_interval', '0.05')