aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Joosten <stefan@sjoosten.nl>2016-08-23 21:04:37 +0200
committerStefan Joosten <stefan@sjoosten.nl>2016-08-23 21:04:37 +0200
commit267dab5f0231d1ba941dfee5f50e26a1bbcff2bf (patch)
tree9c48b7d76b77cd7046e26824a1e47c8dd7164ca2
parentcf50f8c7d35497509d592dd309906503c8d994e5 (diff)
downloadansible-teamspeak-267dab5f0231d1ba941dfee5f50e26a1bbcff2bf.tar.gz
ansible-teamspeak-267dab5f0231d1ba941dfee5f50e26a1bbcff2bf.tar.xz
ansible-teamspeak-267dab5f0231d1ba941dfee5f50e26a1bbcff2bf.zip
Clean up an old INI configuration after turning teamspeak_ini_enabled off again.
-rw-r--r--tasks/install.yml1
-rw-r--r--tasks/main.yml7
2 files changed, 8 insertions, 0 deletions
diff --git a/tasks/install.yml b/tasks/install.yml
index 98d7253..1dcebb2 100644
--- a/tasks/install.yml
+++ b/tasks/install.yml
@@ -66,4 +66,5 @@
group: root
notify:
- Reload systemd
+ - Restart TeamSpeak 3 Server
diff --git a/tasks/main.yml b/tasks/main.yml
index 1b171df..0eaa630 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -19,6 +19,13 @@
- include: config.yml
when: teamspeak_ini_enabled
+# Clean-up a lingering configuration file if we don't need it anymore
+- name: Clean-up configuration
+ file:
+ path: "{{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/{{ teamspeak_ini_filename }}"
+ state: absent
+ when: not teamspeak_ini_enabled
+
# Perform the running of handlers now
# So we can do "Reload systemd" (and possibly queued clean-up)
# before we start using the new/changed .service file.