blob: 0eaa630fe3c6b57681046e9a48a698ad8e5d67a4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
---
# tasks file for teamspeak
- name: "Load OS specific variables"
include_vars: "{{ item }}"
with_first_found:
- files:
- "{{ ansible_distribution|lower }}.yml"
- "{{ ansible_os_family|lower }}.yml"
- "{{ ansible_system|lower }}.yml"
- main.yml
paths:
- ../vars
# Installation of TeamSpeak 3 Server
- include: install.yml
# Configuration of TeamSpeak 3 Server (if requested)
- include: config.yml
when: teamspeak_ini_enabled
# Clean-up a lingering configuration file if we don't need it anymore
- name: Clean-up configuration
file:
path: "{{ teamspeak.home }}/{{ teamspeak.symlink }}/teamspeak3-server_linux_amd64/{{ teamspeak_ini_filename }}"
state: absent
when: not teamspeak_ini_enabled
# Perform the running of handlers now
# So we can do "Reload systemd" (and possibly queued clean-up)
# before we start using the new/changed .service file.
- meta: flush_handlers
# Make sure TeamSpeak 3 Server is started and enabled
- name: Enable and start TeamSpeak 3 Server
service:
name: teamspeak3-server
state: started
enabled: yes
|