aboutsummaryrefslogtreecommitdiffstats
path: root/handlers
diff options
context:
space:
mode:
authorStefan Joosten <stefan@sjoosten.nl>2016-07-31 23:26:40 +0200
committerStefan Joosten <stefan@sjoosten.nl>2016-07-31 23:26:40 +0200
commitd237615854347bd2702ca6bfdc271d99e58a3f54 (patch)
tree053f5ddcd7caf504ba9f85b909f56e771850ed92 /handlers
parent20706004493993c54c1cd6a01cb13257f4946bab (diff)
downloadansible-teamspeak-d237615854347bd2702ca6bfdc271d99e58a3f54.tar.gz
ansible-teamspeak-d237615854347bd2702ca6bfdc271d99e58a3f54.tar.xz
ansible-teamspeak-d237615854347bd2702ca6bfdc271d99e58a3f54.zip
Fixes a small bug in the pruning mechanism. It left some empty directories behind.
Diffstat (limited to 'handlers')
-rw-r--r--handlers/main.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/handlers/main.yml b/handlers/main.yml
index 7da0096..537ba54 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -12,5 +12,5 @@
- name: Prune older TeamSpeak 3 server versions
shell: "{{ item }}"
with_items:
- - find {{ teamspeak.home }}/teamspeak3-server_linux_amd64-*/ -maxdepth 1 -iname 'teamspeak3-server_linux_amd64' -type d | sort | head -n-{{ teamspeak.keep }} | xargs rm -rf
+ - find {{ teamspeak.home }}/teamspeak3-server_linux_amd64-* -maxdepth 0 -type d | sort | head -n-{{ teamspeak.keep }} | xargs echo rm -rf
- find {{ teamspeak.home }}/teamspeak3-server_linux_amd64-*.tar.bz2 -type f | sort | head -n-{{ teamspeak.keep }} | xargs rm -f