diff --git a/releasenotes/notes/kolla-ansible-diff-50de16722aa155dc.yaml b/releasenotes/notes/kolla-ansible-diff-50de16722aa155dc.yaml new file mode 100644 index 0000000000..f3d95c28b6 --- /dev/null +++ b/releasenotes/notes/kolla-ansible-diff-50de16722aa155dc.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds two new arguments to the ``kolla-ansible`` command, ``--check`` + and ``--diff``. They are passed through directly to ``ansible-playbook``. diff --git a/tools/kolla-ansible b/tools/kolla-ansible index 208be612cf..7b1a8b3b3b 100755 --- a/tools/kolla-ansible +++ b/tools/kolla-ansible @@ -140,6 +140,8 @@ Can be specified multiple times to pass multiple inventories. --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 + --check, -C Don't make any changes and try to predict some of the changes that may occur instead + --diff, -D Show differences in ansible-playbook changed tasks --verbose, -v Increase verbosity of ansible-playbook Environment variables: @@ -192,6 +194,8 @@ cat <&2; exit 2; } @@ -267,6 +271,16 @@ while [ "$#" -gt 0 ]; do shift 2 ;; + (--check|-C) + EXTRA_OPTS="$EXTRA_OPTS --check" + shift 1 + ;; + + (--diff|-D) + EXTRA_OPTS="$EXTRA_OPTS --diff" + shift 1 + ;; + (--verbose|-v) VERBOSITY="$VERBOSITY --verbose" shift 1