aboutsummaryrefslogtreecommitdiff
path: root/roles/umurmur/templates/umurmurd.conf.j2
blob: 9e8f8c6cb4875344907e2d30b40a6047d31ea5a7 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# {{ ansible_managed }}
{#
   This configuration is based on the official example
   configuration. More information can be found at
   http://code.google.com/p/umurmur/wiki/Configuring02x
#}

max_bandwidth = {{ max_bandwidth | default(48000) | int }};
welcometext = "{{ welcometext | default('Welcome to uMurmur!') }}";
certificate = "{{ certificate | default('') }}";
private_key = "{{ private_key | default('') }}";
password = "{{ password | default('') }}";
admin_password = "{{ admin_password | default('') }}";
max_users = {{ max_users | default(10) | int }};

bindport = {{ bindport | default(64738) | int }};
bindaddr = "{{ bindaddr | default('0.0.0.0') }}";

{#
   Specify this for privilege dropping. If username is specified but
   not the groupname, the user's login group is used.
#}
username  = "{{ username  | default('umurmur') }}";
groupname = "{{ groupname | default('umurmur') }}";

logfile = "{{ logfile | default('/var/log/umurmurd.log') }}";

enable_ban = {{ enable_ban | default(false) | lower }};
sync_banfile = {{ sync_banfile | default(false) | lower }};
ban_length = {{ ban_length | default(0) | int }};
banfile = "{{ banfile | default('') }}";

channels = (
{% for channel in channels %}
  {
    name = "{{ channel.name }}";
    parent = "{{ channel.parent | default('') }}";
{% if channel.noenter is defined %}
    noenter = {{ channel.noenter | lower }};
{% endif %}
{% if channel.password is defined and channel.password %}
    password = "{{ channel.password }}";
{% endif %}
{% if channel.description is defined and channel.description %}
    description = "{{ channel.description }}";
{% endif %}
{% if channel.silent is defined %}
    silent = {{ channel.silent | lower }};
{% endif %}
{% if channel.position is defined %}
    position = {{ channel.position | int }};
{% endif %}
  }{%- if not loop.last -%},{%- endif %}

{% endfor %}
);

{% if channel_links is defined and channel_links %}
channel_links = (
{% for link in channel_links %}
  {
    source = "{{ link.source }}";
    destination = "{{ link.destination }}";
  }{%- if not loop.last -%},
{%- endif %}

{% endfor %}
);
{% endif %}

{% if default_channel is defined and default_channel %}
default_channel = "{{ default_channel }}";
{% endif %}