96 lines
2.2 KiB
YAML
96 lines
2.2 KiB
YAML
- name: Install mumble-server package
|
|
package:
|
|
name: mumble-server
|
|
state: present
|
|
register: murmur_installed
|
|
|
|
- name: Install ICE dependencies for Python
|
|
package:
|
|
name: "{{ package }}"
|
|
state: present
|
|
loop:
|
|
- python3-zeroc-ice
|
|
- python3-yaml
|
|
- zeroc-ice-compilers
|
|
loop_control:
|
|
loop_var: package
|
|
|
|
- name: Append ssl-cert group to {{ murmur_owner }} user
|
|
user:
|
|
name: "{{ murmur_owner }}"
|
|
state: present
|
|
groups:
|
|
- "{{ acme_ssl_group }}"
|
|
append: yes
|
|
system: yes
|
|
notify: restart murmur
|
|
|
|
- name: Copy Murmur config file
|
|
template:
|
|
src: mumble-server.ini.j2
|
|
dest: /etc/mumble-server.ini
|
|
owner: root
|
|
group: "{{ murmur_group }}"
|
|
mode: "640"
|
|
notify: restart murmur
|
|
|
|
- name: Start mumble-server service
|
|
service:
|
|
name: mumble-server
|
|
enabled: yes
|
|
state: started
|
|
|
|
- name: Write superuser password to a file
|
|
copy:
|
|
content: "{{ murmur_superuser_password }}"
|
|
dest: /etc/mumble-server.secret
|
|
owner: root
|
|
group: root
|
|
mode: "600"
|
|
when: murmur_superuser_password is defined
|
|
notify: change murmur superuser password
|
|
|
|
- name: Trigger Murmur handlers
|
|
meta: flush_handlers
|
|
|
|
- name: Create mumble-ice directory
|
|
file:
|
|
path: "{{ murmur_ice_script_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "755"
|
|
|
|
- name: Copy mice Python script
|
|
copy:
|
|
src: murmur/scripts/mice.py
|
|
dest: "{{ murmur_ice_script_dir }}/mice.py"
|
|
owner: root
|
|
group: root
|
|
mode: "755"
|
|
notify: create murmur channels
|
|
register: _murmur_mice_script_copied
|
|
|
|
- name: Compile Murmur.ice slice file
|
|
command: |-
|
|
slice2py --checksum \
|
|
-I/usr/local/share/Ice \
|
|
-I/usr/share/Ice/slice \
|
|
-I/usr/share/ice/slice \
|
|
/usr/share/slice/Murmur.ice
|
|
args:
|
|
chdir: "{{ murmur_ice_script_dir }}"
|
|
when: _murmur_mice_script_copied is changed
|
|
|
|
- name: Copy mice config
|
|
copy:
|
|
# See https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#formatting-data-yaml-and-json
|
|
content: "{{ murmur_channels | to_nice_yaml(indent=2, width=10000) }}"
|
|
dest: "{{ murmur_ice_config_path }}"
|
|
owner: root
|
|
group: root
|
|
mode: "644"
|
|
notify: create murmur channels
|
|
|
|
- name: Trigger Mice handlers
|
|
meta: flush_handlers |