diff options
author | Matthieu Saulnier <fantom@fedoraproject.org> | 2017-06-16 16:40:07 +0200 |
---|---|---|
committer | Matthieu Saulnier <fantom@fedoraproject.org> | 2017-06-16 16:40:07 +0200 |
commit | d52702878a4b16582666c79a1f78d7fb2d2636a5 (patch) | |
tree | e729886456513a877b5fe67901b2e23d690ebb4a | |
parent | ef2f0573bd6e38086a855f861557ba335c189e95 (diff) | |
download | playbooks-ansible-d52702878a4b16582666c79a1f78d7fb2d2636a5.tar.gz playbooks-ansible-d52702878a4b16582666c79a1f78d7fb2d2636a5.tar.xz playbooks-ansible-d52702878a4b16582666c79a1f78d7fb2d2636a5.zip |
add start script
-rwxr-xr-x | replay | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -0,0 +1,34 @@ +#!/usr/bin/bash + +### +# User variables, you may edit these variables +### +SOURCES=$HOME/park-admin/playbooks-ansible +WORKDIR=/tmp +COUNTLIMIT=10 +### +# Stop editing, it is ready +### + +REPLAY=true +COUNT=1 + +pushd $WORKDIR + +while [[ $REPLAY == "true" ]] && [[ $COUNT -lt $COUNTLIMIT ]] +do + if ( torsocks ansible-playbook --force-handlers -i $SOURCES/hosts $SOURCES/site.yml ) + then + REPLAY=false + else + REPLAY=true + # no infinite loop + COUNT=$((COUNT + 1)) + fi +done + +popd + +echo "End of Replay" +echo "Replay launched $COUNT times" +echo "Have a nice day!" |