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
This commit is contained in:
Jesse Pretorius 2016-06-18 12:00:23 +01:00
parent b8802f5ce1
commit a2326764d3

View File

@ -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