From 7ef374edd6f40c1d8a754fdd58dba22efb707932 Mon Sep 17 00:00:00 2001 From: Stefan Joosten Date: Thu, 25 Aug 2016 23:51:03 +0200 Subject: Made location of source license file configurable. This also makes it possible to use different license files for different hosts. --- README.md | 1 + defaults/main.yml | 1 + tasks/install_license.yml | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 04b5410..cfbf8c6 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ To configure TeamSpeak 3 Server a INI-style configuration file is used. If you r If you have a TeamSpeak 3 Server license, you can have this role install it for you. Place your license file called `licensekey.dat` in the `files/` directory of this role. Tip: if you use Git, add that path to your `.gitignore` to make sure you do not push it somewhere by accident. * `teamspeak_use_license`: Set to `yes` to have your license set up. Default is `no`. +* `teamspeak_license_srcfile`: TeamSpeak 3 Server license file on Ansible host to copy to target. Default searches for the license file at `files/licensekey.dat` * `teamspeak_licensepath`: Used to specify a directory where your license should be located on the target host. If a non-existent directory is specified it will be created for you. Make sure you enable the use of a INI configuration file, otherwise this option will be ineffective. The default is to leave this variable empty, which will place the license file in the same directory as the TeamSpeak 3 Server is installed in. #### Network configuration diff --git a/defaults/main.yml b/defaults/main.yml index 3036c26..216d608 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -15,6 +15,7 @@ teamspeak_ini_enabled: no teamspeak_ini_filename: ts3server.ini teamspeak_use_license: no +teamspeak_license_srcfile: files/licensekey.dat teamspeak_licensepath: teamspeak_network: diff --git a/tasks/install_license.yml b/tasks/install_license.yml index b54b551..25c9365 100644 --- a/tasks/install_license.yml +++ b/tasks/install_license.yml @@ -9,7 +9,7 @@ - name: "License : Copy the license file" copy: - src: licensekey.dat + src: "{{ teamspeak_license_srcfile }}" dest: "{{ teamspeak_licensepath if teamspeak_licensepath is not none else ts3server_dir }}/licensekey.dat" owner: "{{ teamspeak.user }}" group: "{{ teamspeak.user }}" -- cgit v1.2.3-70-g09d2