aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorEgbert Verhage <egbert@eggiecode.org>2016-08-21 12:54:27 +0200
committerEgbert Verhage <egbert@eggiecode.org>2016-08-21 12:54:27 +0200
commitd2bc318f6ee5779ef3eac85890cfd76de9f77a50 (patch)
treed368bba41b9f4d5c9d814c9d508e682115f2236b /templates
parent9c055a880110226dfae26db9a92a7d6c34b7bb11 (diff)
downloadansible-teamspeak-d2bc318f6ee5779ef3eac85890cfd76de9f77a50.tar.gz
ansible-teamspeak-d2bc318f6ee5779ef3eac85890cfd76de9f77a50.tar.xz
ansible-teamspeak-d2bc318f6ee5779ef3eac85890cfd76de9f77a50.zip
Fixed issue #1
Diffstat (limited to 'templates')
-rw-r--r--templates/teamspeak3-server.service.j25
-rw-r--r--templates/ts3server.ini.j217
2 files changed, 21 insertions, 1 deletions
diff --git a/templates/teamspeak3-server.service.j2 b/templates/teamspeak3-server.service.j2
index 4579694..03a8be3 100644
--- a/templates/teamspeak3-server.service.j2
+++ b/templates/teamspeak3-server.service.j2
@@ -7,8 +7,11 @@ Type=simple
User={{ teamspeak.user }}
Group={{ teamspeak.user }}
WorkingDirectory={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64
-Environment='LD_LIBRARY_PATH="{{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/:$LD_LIBRARY_PATH"'
+{% if teamspeak.ini_file is not none %}
+ExecStart={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh inifile={{ teamspeak.ini_file }}
+{% else %}
ExecStart={{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/ts3server_minimal_runscript.sh
+{% endif %}
[Install]
WantedBy=multi-user.target
diff --git a/templates/ts3server.ini.j2 b/templates/ts3server.ini.j2
new file mode 100644
index 0000000..ee6d6f3
--- /dev/null
+++ b/templates/ts3server.ini.j2
@@ -0,0 +1,17 @@
+machine_id={{ teamspeak_ini.machine_id }}
+
+default_voice_port={{teamspeak_ini.voice.default_port}}
+voice_ip={{teamspeak_ini.voice.ip}}
+
+query_port={{teamspeak_ini.query.port}}
+query_ip={{teamspeak_ini.query.ip}}
+
+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 }}