mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Try 'skip_role_on_error: True' in default_vars
This commit is contained in:
parent
bd62849584
commit
2d6943e966
3 changed files with 11 additions and 7 deletions
7
runrole
7
runrole
|
@ -8,7 +8,8 @@ INSTALL=false
|
|||
ENABLED=false
|
||||
REINSTALL=false
|
||||
CWD=`pwd`
|
||||
ARGS="--extra-vars {" # bash forces {...} to '{...}' for Ansible, SEE BOTTOM
|
||||
#ARGS="--extra-vars {"
|
||||
ARGS="--extra-vars {\"skip_role_on_error\":False," # bash forces {...} to '{...}' for Ansible, SEE BOTTOM (IFS-like issue)
|
||||
INVENTORY=ansible_hosts
|
||||
PLAYBOOK=run-one-role.yml
|
||||
|
||||
|
@ -44,7 +45,7 @@ fi
|
|||
#fi
|
||||
|
||||
if [ "$1" == "--reinstall" ]; then
|
||||
ARGS="$ARGS\"reinstall\":True," # Needs boolean not string so use JSON list
|
||||
ARGS="$ARGS\"reinstall\":True," # Needs boolean not string so use JSON list
|
||||
REINSTALL=true
|
||||
shift
|
||||
fi
|
||||
|
@ -110,7 +111,7 @@ else
|
|||
export ANSIBLE_LOG_PATH="$CWD/iiab-debug.log"
|
||||
fi
|
||||
|
||||
ARGS="$ARGS\"role_to_run\":\"$1\"}" # $1 works like \"$1\" if str validated
|
||||
ARGS="$ARGS\"role_to_run\":\"$1\"}" # $1 works like \"$1\" if str type validated
|
||||
CMD="ansible-playbook -i $INVENTORY $PLAYBOOK --connection=local $ARGS"
|
||||
echo -e "\e[1mbash will now run this, adding single quotes around the {...} curly braces:\e[0m\n\n$CMD\n"
|
||||
ansible -m setup -i $INVENTORY localhost --connection=local | grep python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue