From 7321fe772d702f6446c7dd25de00dc01cbedb8d0 Mon Sep 17 00:00:00 2001 From: Clint Byrum Date: Tue, 5 Jun 2018 16:09:44 -0700 Subject: [PATCH] Allow passing forks to kolla-ansible script For large installations it makes sense to use a higher number of forks than the default. Change-Id: I34cdc146a4ed2185fb36fbb34ab72916ec98bee5 --- releasenotes/notes/add-forks-flag-faf0d27618265bd4.yaml | 5 +++++ tools/kolla-ansible | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/add-forks-flag-faf0d27618265bd4.yaml diff --git a/releasenotes/notes/add-forks-flag-faf0d27618265bd4.yaml b/releasenotes/notes/add-forks-flag-faf0d27618265bd4.yaml new file mode 100644 index 0000000000..4e891ac905 --- /dev/null +++ b/releasenotes/notes/add-forks-flag-faf0d27618265bd4.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds a new argument to the ``kolla-ansible`` command, ``--forks NUM``. + This argument is passed through directly to ``ansible-playbook``. diff --git a/tools/kolla-ansible b/tools/kolla-ansible index eb29e7b3ef..86dac7418c 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -44,6 +44,7 @@ Options: --extra, -e Set additional variables as key=value or YAML/JSON passed to ansible-playbook --passwords Specify path to the passwords file --limit Specify host to run plays + --forks Number of forks to run Ansible with --vault-id <@prompt or path> Specify @prompt or password file (Ansible >= 2.4) --ask-vault-pass Ask for vault password --vault-password-file Specify password file for vault decrypt @@ -82,6 +83,7 @@ cat <&2; exit 2; } @@ -199,6 +201,11 @@ while [ "$#" -gt 0 ]; do shift 2 ;; + (--forks) + EXTRA_OPTS="$EXTRA_OPTS --forks $2" + shift 2 + ;; + (--vault-id) EXTRA_OPTS="$EXTRA_OPTS --vault-id $2" shift 2