diff options
author | Matthieu Saulnier <fantom@fedoraproject.org> | 2017-06-22 05:57:21 +0200 |
---|---|---|
committer | Matthieu Saulnier <fantom@fedoraproject.org> | 2017-06-22 05:57:21 +0200 |
commit | 9dcfc0eb3769e21d8661ca700b3627e9b77463cb (patch) | |
tree | 435e888484fb9925b32d2e7e1634650ee8ebcd22 /replay | |
parent | cebbfeed8ef195941a42884993fb7075d427c316 (diff) | |
download | playbooks-ansible-9dcfc0eb3769e21d8661ca700b3627e9b77463cb.tar.gz playbooks-ansible-9dcfc0eb3769e21d8661ca700b3627e9b77463cb.tar.xz playbooks-ansible-9dcfc0eb3769e21d8661ca700b3627e9b77463cb.zip |
fix torrc template and remove vim pkg on all hosts and add clearnet feature in replay script
Diffstat (limited to 'replay')
-rwxr-xr-x | replay | 24 |
1 files changed, 19 insertions, 5 deletions
@@ -6,6 +6,11 @@ SOURCES=$HOME/park-admin/playbooks-ansible WORKDIR=/tmp COUNTLIMIT=10 +# Availables options are: 'clearnet' or 'tornetwork' +NETWORK=clearnet +FORK=8 +TIMEOUT=240 +FLAGS="--force-handlers -f $FORK -T $TIMEOUT" ### # Stop editing, it is ready ### @@ -13,22 +18,31 @@ COUNTLIMIT=10 REPLAY=true COUNT=1 -pushd $WORKDIR +pushd $WORKDIR >/dev/null + +if [[ $NETWORK == "clearnet" ]] +then + CMDLINE=ansible-playbook + HOSTFILE=$SOURCES/hosts.net +elif [[ $NETWORK == "tornetwork" ]] +then + CMDLINE="torsocks ansible-playbook" + HOSTFILE=$SOURCES/hosts.tor +fi while [[ $REPLAY == "true" ]] && [[ $COUNT -lt $COUNTLIMIT ]] do - if ( torsocks ansible-playbook --force-handlers -i $SOURCES/hosts $SOURCES/site.yml ) + if ( $CMDLINE $FLAGS -i $HOSTFILE $SOURCES/site.yml ) then REPLAY=false else - REPLAY=true # no infinite loop COUNT=$((COUNT + 1)) fi done -popd +popd >/dev/null echo "End of Replay" echo "Replay launched $COUNT times" -echo "Have a nice day!" +echo "Have a nice day $USER !" |