aboutsummaryrefslogtreecommitdiffstats
path: root/handlers
diff options
context:
space:
mode:
authorTharre <tharre3@gmail.com>2018-02-20 02:38:41 +0100
committerTharre <tharre3@gmail.com>2018-02-20 03:37:00 +0100
commit8f84cd821701bbfe79c3ecd110d22a10214dd645 (patch)
tree4202aff9808be54140ab577f18b604f3edaec75e /handlers
parent4e32e8d78d2d2bc38ed1c0135d8071fa6a9117f0 (diff)
downloadansible-teamspeak-8f84cd821701bbfe79c3ecd110d22a10214dd645.tar.gz
ansible-teamspeak-8f84cd821701bbfe79c3ecd110d22a10214dd645.tar.xz
ansible-teamspeak-8f84cd821701bbfe79c3ecd110d22a10214dd645.zip
Vastly simplify and refactor the tasks
This mainly includes the complete removal of all the logic involved with storing and deleting multiple versions of teamspeak, which is pointless. All the backup logic has been removed as well, because it is both easier and simpler to just rsync (or the ansible equivalent) the hole ts3 folder over to the target machine.
Diffstat (limited to 'handlers')
-rw-r--r--handlers/main.yml15
1 files changed, 3 insertions, 12 deletions
diff --git a/handlers/main.yml b/handlers/main.yml
index 7726e91..b6da598 100644
--- a/handlers/main.yml
+++ b/handlers/main.yml
@@ -1,16 +1,7 @@
---
-# handlers file for teamspeak
-- name: Reload systemd
- command: systemctl daemon-reload
-
-- name: Restart TeamSpeak 3 Server
- service:
+- name: "Restart teamspeak server"
+ systemd:
name: teamspeak3-server
state: restarted
-
-- name: Prune older TeamSpeak 3 Server versions
- shell: "{{ item }}"
- with_items:
- - 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
+ daemon_reload: yes