aboutsummaryrefslogtreecommitdiffstats
path: root/handlers
diff options
context:
space:
mode:
authorStefan Joosten <stefan@sjoosten.nl>2016-07-31 02:33:23 +0200
committerStefan Joosten <stefan@sjoosten.nl>2016-07-31 02:40:03 +0200
commit509c5986cfa2458156a4543332530a002a01c59a (patch)
treea688aff54ce8b022608e32ab94d68286be807f57 /handlers
parent1786fb4baee84deeaae30ec3aa0e59d0c92a812c (diff)
downloadansible-teamspeak-509c5986cfa2458156a4543332530a002a01c59a.tar.gz
ansible-teamspeak-509c5986cfa2458156a4543332530a002a01c59a.tar.xz
ansible-teamspeak-509c5986cfa2458156a4543332530a002a01c59a.zip
Inplemented first version of a updating mechanism.
README.md: Documented new variable and requirement. defaults/main.yml: Changed symlink to "current" handlers/main.yml: "reload systemd" -> "Reload systemd" Added pruning of old TS3Server versions. tasks/main.yml: Added version number of TS3Server in names. Added tasks to perform updating. Changed symlink path. Changed task name for service file slightly. templates/teamspeak3-server.service.j2: updated to use the new symlink path.
Diffstat (limited to 'handlers')
-rw-r--r--handlers/main.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/handlers/main.yml b/handlers/main.yml
index 41d0044..154a161 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,5 +1,8 @@
---
# handlers file for teamspeak
-- name: reload systemd
+- name: Reload systemd
command: systemctl daemon-reload
+
+- name: Prune older TeamSpeak 3 server versions
+ shell: "find {{ teamspeak.home }}/teamspeak3-server_linux_amd64-*/ -maxdepth 1 -iname 'teamspeak3-server_linux_amd64' -type d | head -n-2 | xargs rm -rf"