diff options
author | Stefan Joosten <stefan@sjoosten.nl> | 2016-07-31 15:23:56 +0200 |
---|---|---|
committer | Stefan Joosten <stefan@sjoosten.nl> | 2016-07-31 15:23:56 +0200 |
commit | 20706004493993c54c1cd6a01cb13257f4946bab (patch) | |
tree | 98c4eb306a2e1ba63001d26ad2b7970a7b8f3eab | |
parent | dc078c28d02e78f6a5623af724cb969fe877b503 (diff) | |
download | ansible-teamspeak-20706004493993c54c1cd6a01cb13257f4946bab.tar.gz ansible-teamspeak-20706004493993c54c1cd6a01cb13257f4946bab.tar.xz ansible-teamspeak-20706004493993c54c1cd6a01cb13257f4946bab.zip |
Pruning of old versions now also removes the old archives
-rw-r--r-- | handlers/main.yml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/handlers/main.yml b/handlers/main.yml index f7b1d10..7da0096 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -10,4 +10,7 @@ state: restarted - name: Prune older TeamSpeak 3 server versions - shell: "find {{ teamspeak.home }}/teamspeak3-server_linux_amd64-*/ -maxdepth 1 -iname 'teamspeak3-server_linux_amd64' -type d | sort | head -n-{{ teamspeak.keep }} | xargs rm -rf" + 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-*.tar.bz2 -type f | sort | head -n-{{ teamspeak.keep }} | xargs rm -f |