diff options
author | Stefan Joosten <stefan@sjoosten.nl> | 2016-08-26 00:31:49 +0200 |
---|---|---|
committer | Stefan Joosten <stefan@sjoosten.nl> | 2016-08-26 00:31:49 +0200 |
commit | 9f7b61ea916c73b556d19b5c1d982ea9e5fb007f (patch) | |
tree | 84c0ad246251245224e63de848742625d878f481 /tasks/main.yml | |
parent | be6b41e5c246d4c249c3d068b543a0f97326f3ac (diff) | |
parent | 7ef374edd6f40c1d8a754fdd58dba22efb707932 (diff) | |
download | ansible-teamspeak-9f7b61ea916c73b556d19b5c1d982ea9e5fb007f.tar.gz ansible-teamspeak-9f7b61ea916c73b556d19b5c1d982ea9e5fb007f.tar.xz ansible-teamspeak-9f7b61ea916c73b556d19b5c1d982ea9e5fb007f.zip |
Merge branch 'issue3'
Add the functionality to include a TeamSpeak 3 Server license file.
Close issue #3
Diffstat (limited to 'tasks/main.yml')
-rw-r--r-- | tasks/main.yml | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/tasks/main.yml b/tasks/main.yml index 0eaa630..9e619fc 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -15,16 +15,38 @@ # Installation of TeamSpeak 3 Server - include: install.yml +# Store the TeamSpeak 3 Server directory in a short variable +- name: "Set TeamSpeak 3 Server directory fact" + set_fact: + ts3server_dir: "{{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64" + +# License file management + # Install a license file +- include: install_license.yml + when: teamspeak_use_license + + # Remove a possible leftover license file when teamspeak_use_license is disabled. + # The default is to look for it in the TeamSpeak 3 Server directory, so + # we remove it there if the option has been disabled. +- name: "License : Clean up license in TeamSpeak 3 Server directory if needed" + file: + path: "{{ ts3server_dir }}/licensekey.dat" + state: absent + when: not teamspeak_use_license +# End of license file management + # Configuration of TeamSpeak 3 Server (if requested) + # Create configuration file - include: config.yml when: teamspeak_ini_enabled -# Clean-up a lingering configuration file if we don't need it anymore -- name: Clean-up configuration + # Clean-up a lingering configuration file if we don't need it anymore +- name: "Configuration : Clean-up old configuration file if needed" file: path: "{{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/{{ teamspeak_ini_filename }}" state: absent when: not teamspeak_ini_enabled +# End of configuration # Perform the running of handlers now # So we can do "Reload systemd" (and possibly queued clean-up) |