From a2326764d3034080ada67f777b546eb4f5c700e8 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Sat, 18 Jun 2016 12:00:23 +0100 Subject: [PATCH] Gate: Restrict Ansible fact gathering to base subset In Ansible 2.x the fact gathering process includes facts gathered by facter [1] and ohai [2]if they are available. While this may be useful in some environment, OpenStack-Ansible does not make use of any of these facts in any of its playbooks/roles and the facts gathered are therefore just an extra overhead. This patch removes the facter and aohai gathering subsets. On a test AIO this reduced the execution time for fact gathering to the host and all running containers from 1m5s to 6s. [1] https://docs.puppet.com/facter/ [2] https://docs.chef.io/ohai.html Change-Id: Id2a932a98ebfa2534bcce7ba488906fa4f03d0a6 --- scripts/run-playbooks.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/run-playbooks.sh b/scripts/run-playbooks.sh index c1aaa5a0a6..0e37431731 100755 --- a/scripts/run-playbooks.sh +++ b/scripts/run-playbooks.sh @@ -39,10 +39,10 @@ info_block "Checking for required libraries." 2> /dev/null || source $(dirname $ # Initiate the deployment pushd "playbooks" - ansible -m setup localhost + ansible localhost -m setup -a 'gather_subset=!facter,!ohai' if [ "${DEPLOY_HOST}" == "no" ]; then - ansible -m setup all + ansible all -m setup -a 'gather_subset=!facter,!ohai' fi if [ "${DEPLOY_HOST}" == "yes" ]; then @@ -76,7 +76,7 @@ pushd "playbooks" # Create the containers. install_bits lxc-containers-create.yml - ansible -m setup all + ansible all -m setup -a 'gather_subset=!facter,!ohai' # Log some data about the instance and the rest of the system log_instance_info