Merge "Add check and diff options to kolla-ansible"
This commit is contained in:
@@ -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``.
|
||||||
@@ -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)
|
--vault-id <@prompt or path> Specify @prompt or password file (Ansible >= 2.4)
|
||||||
--ask-vault-pass Ask for vault password
|
--ask-vault-pass Ask for vault password
|
||||||
--vault-password-file <path> Specify password file for vault decrypt
|
--vault-password-file <path> 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
|
--verbose, -v Increase verbosity of ansible-playbook
|
||||||
|
|
||||||
Environment variables:
|
Environment variables:
|
||||||
@@ -192,6 +194,8 @@ cat <<EOF
|
|||||||
--vault-id
|
--vault-id
|
||||||
--ask-vault-pass
|
--ask-vault-pass
|
||||||
--vault-password-file
|
--vault-password-file
|
||||||
|
--check -C
|
||||||
|
--diff -D
|
||||||
--verbose -v
|
--verbose -v
|
||||||
prechecks
|
prechecks
|
||||||
check
|
check
|
||||||
@@ -220,8 +224,8 @@ EOF
|
|||||||
|
|
||||||
check_environment_coherence
|
check_environment_coherence
|
||||||
|
|
||||||
SHORT_OPTS="hi:p:t:k:e:v"
|
SHORT_OPTS="hi:p:t:k:e:CD:v"
|
||||||
LONG_OPTS="help,inventory:,playbook:,skip-tags:,tags:,key:,extra:,verbose,configdir:,passwords:,limit:,forks:,vault-id:,ask-vault-pass,vault-password-file:,yes-i-really-really-mean-it,include-images,include-dev:,full,incremental"
|
LONG_OPTS="help,inventory:,playbook:,skip-tags:,tags:,key:,extra:,check,diff,verbose,configdir:,passwords:,limit:,forks:,vault-id:,ask-vault-pass,vault-password-file:,yes-i-really-really-mean-it,include-images,include-dev:,full,incremental"
|
||||||
|
|
||||||
RAW_ARGS="$*"
|
RAW_ARGS="$*"
|
||||||
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
|
ARGS=$(getopt -o "${SHORT_OPTS}" -l "${LONG_OPTS}" --name "$0" -- "$@") || { usage >&2; exit 2; }
|
||||||
@@ -267,6 +271,16 @@ while [ "$#" -gt 0 ]; do
|
|||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
(--check|-C)
|
||||||
|
EXTRA_OPTS="$EXTRA_OPTS --check"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
|
||||||
|
(--diff|-D)
|
||||||
|
EXTRA_OPTS="$EXTRA_OPTS --diff"
|
||||||
|
shift 1
|
||||||
|
;;
|
||||||
|
|
||||||
(--verbose|-v)
|
(--verbose|-v)
|
||||||
VERBOSITY="$VERBOSITY --verbose"
|
VERBOSITY="$VERBOSITY --verbose"
|
||||||
shift 1
|
shift 1
|
||||||
|
|||||||
Reference in New Issue
Block a user