]> git.phdru.name Git - ansible.git/blob - playbooks/ansible/cleanup-tmp.sh
Refactor(cleanup-tmp.sh): Use `ansible --list-hosts` instead of `run-hosts -L`
[ansible.git] / playbooks / ansible / cleanup-tmp.sh
1 #! /bin/sh
2
3 hosts="`\"$HOME\"/.virtualenvs/ansible/bin/ansible --list-hosts servers | tail -n +2`"
4
5 echo localhost
6 rm -rf "$HOME"/.ansible/tmp/\*
7
8 for host in $hosts; do
9    echo $host
10    ssh $host exec rm -rf .ansible/tmp/\*
11 done