murmur: multiline welcome text and channels' config as a variable

master
HgO 2020-12-26 10:48:14 +01:00
parent 26fa2cb9ad
commit bc0cb0139f
3 changed files with 67 additions and 21 deletions

View File

@ -98,6 +98,48 @@ murmur_client_certificate_required: no
murmur_send_server_version: yes
murmur_ice_warn_unknown_properties: yes
murmur_ice_message_size_max: 65536
murmur_channels:
- name: Root
description: Root channel. No entry.
groups:
admin:
inherit: true
inheritable: true
permissions:
- group: all
deny:
- Enter
recursive: false
enabled: true
- group: all
allow:
- RegisterSelf
- MakeTempChannel
- group: admin
allow:
- MuteDeafen
- Move
- Kick
- Ban
- Register
- name: Welcome
parent: Root
description: Welcome channel
position: 0
isdefault: true
- name: Silent
parent: Root
description: Silent channel
position: 1
permissions:
- group: all
deny:
- Speak
- MakeTempChannel
enabled: true
- group: admin
allow:
- MakeTempChannel
umurmur_enabled: no
umurmur_domain: "{{ mumble_domain }}"
@ -105,29 +147,29 @@ umurmur_max_bandwidth: 48000
umurmur_max_users: 100
umurmur_server_password: ""
umurmur_channels:
- name: Root
description: Root channel. No entry.
noenter: yes
- name: Welcome
parent: Root
description: Welcome channel
position: 0
- name: Silent
parent: Root
description: Silent channel
silent: yes
position: 1
- name: Root
description: Root channel. No entry.
noenter: yes
- name: Welcome
parent: Root
description: Welcome channel
position: 0
- name: Silent
parent: Root
description: Silent channel
silent: yes
position: 1
umurmur_default_channel: Welcome
umurmur_welcome_text: "Welcome on the {{ inventory_hostname }} Mumble server!"
umurmur_channel_links:
- source: "{{ umurmur_default_channel }}"
destinations: >-
{{ umurmur_channels
| selectattr('parent', 'defined')
| selectattr('parent', '==', umurmur_default_channel)
| map(attribute='name')
| list
}}
- source: "{{ umurmur_default_channel }}"
destinations: >-
{{ umurmur_channels
| selectattr('parent', 'defined')
| selectattr('parent', '==', umurmur_default_channel)
| map(attribute='name')
| list
}}
umurmur_ssl_group: "{{ acme_ssl_group }}"
umurmur_certificate: "{{ acme_certs_dir }}/{{ umurmur_domain }}.d/{{ acme_enabled | ternary('fullchain', 'cert') }}.pem"
umurmur_private_key: "{{ acme_keys_dir }}/{{ umurmur_domain }}.key"

View File

@ -84,7 +84,7 @@
- name: Copy mice config
copy:
src: murmur/mice.yml
content: "{{ murmur_channels | to_nice_yaml(indent=2) }}"
dest: "{{ murmur_ice_config_path }}"
owner: root
group: root

View File

@ -140,7 +140,11 @@ pidfile={{ murmur_pid_file | to_json }}
; Welcome message sent to clients when they connect.
; If the welcome message is set to an empty string,
; no welcome message will be sent to clients.
{% if murmur_welcome_text is string %}
welcometext={{ murmur_welcome_text | to_json }}
{% else %}
welcometext = {{ murmur_welcome_text | join('<br />') | to_json }};
{% endif %}
; Port to bind TCP and UDP sockets to.
port={{ murmur_port }}