X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=playbooks%2Fansible%2Fcleanup-tmp.sh;h=1fdefca184e7ae7e197c667425f74bf2f1d4bc8c;hb=9e819bff72d8ee2a3186d8ecae647ad1d432b85e;hp=a946fb8840d0e4f48543a85c9c345c6cc280fde9;hpb=d4b10fb0ca0d4f06f15ab59e9b9e940e6ee7de4c;p=ansible.git diff --git a/playbooks/ansible/cleanup-tmp.sh b/playbooks/ansible/cleanup-tmp.sh index a946fb8..1fdefca 100755 --- a/playbooks/ansible/cleanup-tmp.sh +++ b/playbooks/ansible/cleanup-tmp.sh @@ -1,9 +1,11 @@ #! /bin/sh +hosts="`\"$HOME\"/.virtualenvs/ansible/bin/ansible --list-hosts servers | tail -n +2`" + echo localhost -rm -rf .ansible/tmp/\* +rm -rf "$HOME"/.ansible/tmp/\* -for host in `run-hosts -e`; do +for host in $hosts; do echo $host - ssh -4 $host exec rm -rf .ansible/tmp/\* + ssh $host exec rm -rf .ansible/tmp/\* done