From d9a3758952a0689e0608543c12c712b48fed33e7 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 3 Jun 2021 16:23:00 +0100 Subject: Add kolla-ansible gather-facts command In some situations it may be helpful to populate the fact cache on demand. The 'kolla-ansible gather-facts' command may be used to do this. One specific case where this may be helpful is when running kolla-ansible with a --limit argument, since in that case hosts that match the limit will gather facts for hosts that fall outside the limit. In the extreme case of a limit that matches only one host, it will serially gather facts for all other hosts. To avoid this issue, run 'kolla-ansible gather-facts' without a limit to populate the fact cache in parallel before running the required command with a limit. Change-Id: I79db9bca23aa1bd45bafa7e7500a90de5a684593 --- tools/kolla-ansible | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tools') diff --git a/tools/kolla-ansible b/tools/kolla-ansible index 05e40d313..d733c22be 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -161,6 +161,7 @@ Commands: deploy-bifrost Deploy and start bifrost container deploy-servers Enroll and deploy servers with bifrost deploy-containers Only deploy and start containers (no config updates or bootstrapping) + gather-facts Gather Ansible facts post-deploy Do post deploy on deploy node pull Pull all images for containers (only pulls, no running container changes) reconfigure Reconfigure OpenStack service @@ -203,6 +204,7 @@ deploy deploy-bifrost deploy-containers deploy-servers +gather-facts post-deploy pull reconfigure @@ -429,6 +431,10 @@ EOF PLAYBOOK="${BASEDIR}/ansible/bifrost.yml" EXTRA_OPTS="$EXTRA_OPTS -e kolla_action=deploy-servers" ;; +(gather-facts) + ACTION="Gathering Ansible facts" + PLAYBOOK="${BASEDIR}/ansible/gather-facts.yml" + ;; (post-deploy) ACTION="Post-Deploying Playbooks" PLAYBOOK="${BASEDIR}/ansible/post-deploy.yml" -- cgit v1.2.3