Skip to content
Snippets Groups Projects
Commit c533945d authored by Jenkins's avatar Jenkins Committed by Gerrit Code Review
Browse files

Merge "Add the keyfile option to decrypt the passwords.yml"

parents 1360c9f7 0f01d3eb
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,7 @@ Usage: $0 COMMAND [options] ...@@ -30,6 +30,7 @@ Usage: $0 COMMAND [options]
Options: Options:
--inventory, -i <inventory_path> Specify path to ansible inventory file --inventory, -i <inventory_path> Specify path to ansible inventory file
--playbook, -p <playbook_path> Specify path to ansible playbook file --playbook, -p <playbook_path> Specify path to ansible playbook file
--keyfile, -k <key_file> Specify path to ansible vault keyfile
--help, -h Show this usage information --help, -h Show this usage information
--tags, -t <tags> Only run plays and tasks tagged with these values --tags, -t <tags> Only run plays and tasks tagged with these values
...@@ -41,9 +42,11 @@ Commands: ...@@ -41,9 +42,11 @@ Commands:
EOF EOF
} }
SHORT_OPTS="hi:p:t:"
LONG_OPTS="help,inventory:,playbook:,tags:" SHORT_OPTS="hi:p:t:k:"
LONG_OPTS="help,inventory:,playbook:,tags:,keyfile:"
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; }
eval set -- "$ARGS" eval set -- "$ARGS"
find_base_dir find_base_dir
...@@ -69,6 +72,12 @@ while [ "$#" -gt 0 ]; do ...@@ -69,6 +72,12 @@ while [ "$#" -gt 0 ]; do
shift 2 shift 2
;; ;;
(--keyfile|-k)
VAULT_PASS_FILE="$2"
EXTRA_OPTS="$EXTRA_OPTS --vault-password-file=$VAULT_PASS_FILE"
shift 2
;;
(--help|-h) (--help|-h)
usage usage
shift shift
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment