summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthieu Saulnier <fantom@fedoraproject.org>2017-06-16 16:40:07 +0200
committerMatthieu Saulnier <fantom@fedoraproject.org>2017-06-16 16:40:07 +0200
commitd52702878a4b16582666c79a1f78d7fb2d2636a5 (patch)
treee729886456513a877b5fe67901b2e23d690ebb4a
parentef2f0573bd6e38086a855f861557ba335c189e95 (diff)
downloadplaybooks-ansible-d52702878a4b16582666c79a1f78d7fb2d2636a5.tar.gz
playbooks-ansible-d52702878a4b16582666c79a1f78d7fb2d2636a5.tar.xz
playbooks-ansible-d52702878a4b16582666c79a1f78d7fb2d2636a5.zip
add start script
-rwxr-xr-xreplay34
1 files changed, 34 insertions, 0 deletions
diff --git a/replay b/replay
new file mode 100755
index 0000000..90b1ef3
--- /dev/null
+++ b/replay
@@ -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!"