Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Never remove the ansible_inventory if --dry-run is used
Browse files Browse the repository at this point in the history
We currently do this:
if [ "$OPT_RETAIN_INVENTORY_FILE" = 0 ]; then
     # Clear out inventory file to avoid tripping over data
     # from a previous invocation
     rm -f $ANSIBLE_INVENTORY

This is very unexpected for a first-time user that has already deployed
a system and would like to inspect the tasks.

Let's remove it when we do not use the --dry-run option

Closes-Bug: #1775024

Change-Id: Ic52436ae2d5983e15f4e128edf1562510c3f7259
  • Loading branch information
mbaldessari committed Jun 4, 2018
1 parent e122952 commit b98f1be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quickstart.sh
Expand Up @@ -493,7 +493,7 @@ export ARA_DATABASE="sqlite:///${OPT_WORKDIR}/ara.sqlite"
#set the ansible ssh.config options if not already set.
source $OOOQ_DIR/ansible_ssh_env.sh

if [ "$OPT_RETAIN_INVENTORY_FILE" = 0 ]; then
if [ "$OPT_RETAIN_INVENTORY_FILE" = 0 && -z "$OPT_LIST_TASKS_ONLY" ]; then
# Clear out inventory file to avoid tripping over data
# from a previous invocation
rm -f $ANSIBLE_INVENTORY
Expand Down

0 comments on commit b98f1be

Please sign in to comment.