diff --git a/defaults/main.yml b/defaults/main.yml index 31ad35c..8f8f12d 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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" diff --git a/tasks/murmur.yml b/tasks/murmur.yml index 81c2b8b..1aab45b 100644 --- a/tasks/murmur.yml +++ b/tasks/murmur.yml @@ -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 diff --git a/templates/mumble-server.ini.j2 b/templates/mumble-server.ini.j2 index 7218af8..4642e87 100644 --- a/templates/mumble-server.ini.j2 +++ b/templates/mumble-server.ini.j2 @@ -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('
') | to_json }}; +{% endif %} ; Port to bind TCP and UDP sockets to. port={{ murmur_port }}