diff options
author | Stefan Joosten <stefan@sjoosten.nl> | 2016-08-23 20:34:32 +0200 |
---|---|---|
committer | Stefan Joosten <stefan@sjoosten.nl> | 2016-08-23 20:34:32 +0200 |
commit | cf50f8c7d35497509d592dd309906503c8d994e5 (patch) | |
tree | 1080a8fc28755db9c099e1dd8cdafb3e4c5f5b93 /templates | |
parent | 4088a3ec70d18f7174723609af79587cf65a0ed7 (diff) | |
download | ansible-teamspeak-cf50f8c7d35497509d592dd309906503c8d994e5.tar.gz ansible-teamspeak-cf50f8c7d35497509d592dd309906503c8d994e5.tar.xz ansible-teamspeak-cf50f8c7d35497509d592dd309906503c8d994e5.zip |
Fix issue #1.
Rewrote parts of Egbert Verhage's patches. Thank you again for the work.
This work adds the possibility to generate a INI-style configuration file for the TeamSpeak 3 Server.
The scope is limited to creating and use of the INI config file, and ability to configure network settings, the machine ID and default creation of the first virtual server.
More features can follow soon after.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/teamspeak3-server.service.j2 | 4 | ||||
-rw-r--r-- | templates/ts3server.ini.j2 | 26 |
2 files changed, 14 insertions, 16 deletions
diff --git a/templates/teamspeak3-server.service.j2 b/templates/teamspeak3-server.service.j2 index 03a8be3..485084e 100644 --- a/templates/teamspeak3-server.service.j2 +++ b/templates/teamspeak3-server.service.j2 @@ -7,8 +7,8 @@ Type=simple User={{ teamspeak.user }} Group={{ teamspeak.user }} WorkingDirectory={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64 -{% if teamspeak.ini_file is not none %} -ExecStart={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh inifile={{ teamspeak.ini_file }} +{% if teamspeak_ini_enabled %} +ExecStart={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh inifile={{ teamspeak_ini_filename }} {% else %} ExecStart={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh {% endif %} diff --git a/templates/ts3server.ini.j2 b/templates/ts3server.ini.j2 index ee6d6f3..6c3f341 100644 --- a/templates/ts3server.ini.j2 +++ b/templates/ts3server.ini.j2 @@ -1,17 +1,15 @@ -machine_id={{ teamspeak_ini.machine_id }} +{% if teamspeak_machine_id is not none %} +machine_id={{ teamspeak_machine_id }} +{% endif %} -default_voice_port={{teamspeak_ini.voice.default_port}} -voice_ip={{teamspeak_ini.voice.ip}} +default_voice_port={{ teamspeak_network.voice.default_port }} +voice_ip={{ teamspeak_network.voice.ip }} +filetransfer_port={{ teamspeak_network.filetransfer.port }} +filetransfer_ip={{ teamspeak_network.filetransfer.ip }} +query_port={{ teamspeak_network.query.port }} +query_ip={{ teamspeak_network.query.ip }} -query_port={{teamspeak_ini.query.port}} -query_ip={{teamspeak_ini.query.ip}} +{% if teamspeak_create_default_virtualserver %} +create_default_virtualserver=1 +{% endif %} -filetransfer_port={{teamspeak_ini.filetransfer.port}} -filetransfer_ip={{teamspeak_ini.filetransfer.ip}} - -dbplugin={{ teamspeak_ini.db_plugin }} -dbpluginparameter={{ 'ts3db_mysql.ini' if teamspeak_ini.db_plugin == 'ts3db_mysql' else '' }} -dbsqlpath=sql/ -dbsqlcreatepath={{ 'create_mysql/' if teamspeak_ini.db_plugin == 'ts3db_mysql' else 'create_sqlite/' }} -logpath={{ teamspeak_ini.logpath }} -logquerycommands={{ teamspeak_ini.logquerycommands }} |