From 819bb41873e49c520fc4506dfc00d46b6e849f44 Mon Sep 17 00:00:00 2001 From: Stefan Joosten Date: Thu, 25 Aug 2016 16:19:31 +0200 Subject: Updated README with license functionality --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3135fd7..04b5410 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ These variables define properties for the user thats going to run the TeamSpeak * `teamspeak.symlink`: Name of symlink to point to current TeamSpeak 3 server directory. Defaults to "current". * `teamspeak.version`: Version of Teamspeak 3 Server to install. Defaults to "3.0.12.4". * `teamspeak.checksum`: SHA256 checksum of archive of TeamSpeak 3 server version for verification purposes. Example: "sha256:6bb0e8c8974fa5739b90e1806687128342b3ab36510944f576942e67df7a1bd9" -* `teamspeak.keep`: Amount of TeamSpeak 3 server versions to keep installed, includes the currently installed version. A setting of "3" keeps the current and two previous version installed, which is the default. In case an upgrade goes wrong, you simply rewind the `teamspeak.version` and `teamspeak.checksum` to the older version and run the role again to downgrade back to a known good. +* `teamspeak.keep`: Amount of TeamSpeak 3 server versions to keep installed, includes the currently installed version. A setting of "2" keeps the current and two previous version installed, which is the default. In case an upgrade goes wrong, you simply rewind the `teamspeak.version` and `teamspeak.checksum` to the older version and run the role again to downgrade back to a known good. ### Further configuraton To configure TeamSpeak 3 Server a INI-style configuration file is used. If you require detailed configuration, enable creation of such a file by setting the `teamspeak_ini_enabled` to `yes`. For example by defining it that way in host or group vars in your playbook. A INI file containing your configuration will be created. @@ -41,9 +41,16 @@ To configure TeamSpeak 3 Server a INI-style configuration file is used. If you r * `teamspeak_ini_enabled`: Set to `yes` if you want use the configuration options listed below. It will create INI-style configuration file for the TeamSpeak 3 Server to use. Defaults to `no`. * `teamspeak_ini_filename`: Name of the INI-style configuration file. Defaults to `ts3server.ini`. +#### License file + +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_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 -The following configuration blocks can be used to configure the TeamSpeak 3 Server as you please. Make sure to define the configuration blocks in full as they contain nested properties. Most reliable way would be to copy a block from the `defaults/main.yml` into your own definitions file and edit accordingly. +The network configuration block can be used to configure the TeamSpeak 3 Server as you please. Make sure to define the configuration block in full as it contains nested properties. Most reliable way would be to copy a block from the `defaults/main.yml` into your own definitions file and edit accordingly. Description of the `teamspeak_network` configuration block and it's options: -- cgit v1.2.3-70-g09d2 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(-) (limited to 'README.md') 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