aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Joosten <stefan@sjoosten.nl>2016-08-25 23:51:03 +0200
committerStefan Joosten <stefan@sjoosten.nl>2016-08-25 23:51:03 +0200
commit7ef374edd6f40c1d8a754fdd58dba22efb707932 (patch)
treebf262b5f24d79efb09def6a04c57fa13575e420a
parentb331fee529dc21d54b3a495d6fa68029a3920648 (diff)
downloadansible-teamspeak-issue3.tar.gz
ansible-teamspeak-issue3.tar.xz
ansible-teamspeak-issue3.zip
Made location of source license file configurable.issue3
This also makes it possible to use different license files for different hosts.
-rw-r--r--README.md1
-rw-r--r--defaults/main.yml1
-rw-r--r--tasks/install_license.yml2
3 files changed, 3 insertions, 1 deletions
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 }}"