Merge "Restrict Ansible fact gathering to base subset"
This commit is contained in:
commit
2c6857b7a3
@ -12,6 +12,7 @@ library = /etc/ansible/roles/plugins/library
|
||||
|
||||
# Fact caching
|
||||
gathering = smart
|
||||
gather_subset = !facter,!ohai
|
||||
fact_caching = jsonfile
|
||||
fact_caching_connection = /etc/openstack_deploy/ansible_facts
|
||||
fact_caching_timeout = 86400
|
||||
|
@ -25,7 +25,7 @@
|
||||
# repo_all[0] is built last to ensure it has all build artifacts for final indexing
|
||||
- name: Build new repo packages for a given release
|
||||
hosts: repo_all[1:],repo_all[0]
|
||||
gather_facts: true
|
||||
gather_facts: "{{ gather_facts | default(True) }}"
|
||||
user: root
|
||||
serial: 1
|
||||
pre_tasks:
|
||||
|
@ -45,7 +45,19 @@ If you ever have any questions please join the community conversation on IRC at
|
||||
}
|
||||
|
||||
function playbook_run {
|
||||
|
||||
# First we gather facts about the hosts to populate the fact cache.
|
||||
# We can't gather the facts for all hosts yet because the containers
|
||||
# aren't built yet.
|
||||
ansible -m setup -a "gather_subset=!facter,!ohai" hosts
|
||||
|
||||
for root_include in $(awk -F'include:' '{print $2}' setup-everything.yml); do
|
||||
# Once setup-hosts is complete, we should gather facts for everything
|
||||
# (now including containers) so that the fact cache is complete for the
|
||||
# remainder of the run.
|
||||
if [[ "${root_include}" == "setup-infrastructure.yml" ]]; then
|
||||
ansible -m setup -a "gather_subset=!facter,!ohai" all
|
||||
fi
|
||||
for include in $(awk -F'include:' '{print $2}' "${root_include}"); do
|
||||
echo "[Executing \"${include}\" playbook]"
|
||||
if [[ "${DEPLOY_AIO}" = true ]] && [[ "${include}" == "security-hardening.yml" ]]; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user