ansible-collection-irc/roles/inspircd/templates/etc/inspircd/inspircd.conf.2
2020-12-15 21:20:28 +01:00

154 lines
No EOL
5 KiB
Groff

{{ ansible_managed | comment }}
<config format="xml">
#
# MODULES
#
{% for module in inspircd_modules %}
<module name="{{ module }}">
{% endfor %}
{% for module in inspircd_modules_additional %}
<module name="{{ module }}">
{% endfor %}
#
# SERVER METADATA
#
<server
name="{{ inspircd_server_hostname }}"
{% if inspircd_server_id is defined %}
id="{{ inspircd_server_id }}"
{% endif %}
description="{{ inspircd_server_description }}"
network="{{ inspircd_server_network }}">
<admin
{% if inspircd_admin_name is defined %}
name="{{ inspircd_admin_name }}"
{% endif %}
nick="{{ inspircd_admin_nick }}"
email="{{ inspircd_admin_email }}">
{% if 'ssl_gnutls' in inspircd_modules + inspircd_modules_additional %}
#
# TLS CONFIG
#
{% for name, profile in inspircd_gnutls_profiles.items() %}
<sslprofile
name="{{ name }}"
provider="gnutls"
{% if 'cafile' in profile %}cafile="{{ profile.cafile }}"{% endif %}
{% if 'certfile' in profile %}certfile="{{ profile.certfile }}"{% endif %}
{% if 'crlfile' in profile %}crlfile="{{ profile.crlfile }}"{% endif %}
{% if 'dhfile' in profile %}dhfile="{{ profile.dhfile }}"{% endif %}
{% if 'hash' in profile %}hash="{{ profile.hash }}"{% endif %}
{% if 'cafile' in profile %}cafile="{{ profile.cafile }}"{% endif %}
{% if 'keyfile' in profile %}keyfile="{{ profile.keyfile }}"{% endif %}
{% if 'mindhbits' in profile %}mindhbits="{{ profile.mindhbits }}"{% endif %}
{% if 'outrecsize' in profile %}outrecsize="{{ profile.outrecsize }}"{% endif %}
{% if 'priority' in profile %}priority="{{ profile.priority }}"{% endif %}
{% if 'requestclientcert' in profile %}requestclientcert="{{ profile.requestclientcert | ternary('yes', 'no') }}"{% endif %}
{% if 'strictpriority' in profile %}strictpriority="{{ profile.strictpriority | ternary('yes', 'no') }}"{% endif %}>
{% endfor %}
{% endif %}{# ssl_gnutls in modules #}
#
# SERVER ENDPOINTS
#
{% for bind in inspircd_bind %}
<bind
{% if 'address' in bind %}address="{{ bind.address }}"{% endif %}
{% if 'port' in bind %}port="{{ bind.port }}"{% endif %}
{% if 'defer' in bind %}defer="{{ bind.defer }}"{% endif %}
{% if 'free' in bind %}free="{{ bind.free | ternary('yes', 'no') }}"{% endif %}
{% if 'path' in bind %}path="{{ path.cafile }}"{% endif %}
{% if 'permissions' in bind %}permissions="{{ bind.permissions }}"{% endif %}
{% if 'replace' in bind %}replace="{{ bind.replace | ternary('yes', 'no') }}"{% endif %}
{% if 'type' in bind %}type="{{ bind.type }}"{% endif %}
{% if 'ssl' in bind %}ssl="{{ bind.ssl }}"{% endif %}>
{% endfor %}
{% if 'spanningtree' in inspircd_modules + inspircd_modules_additional %}
#
# IRC NETWORK
#
{% for ac in inspircd_autoconnect %}
<autoconnect
{% if 'period' in ac %}period="{{ ac.period }}"{% endif %}
server="{{ ac.servers | join('') }}">
{% endfor %}
{% for name, link in inspircd_links.items() %}
<link
name="{{ name }}"
ipaddr="{{ link.ipaddr }}"
allowmask="{{ link.allowcidr | join(' ') }}"
sendpass="{{ inspircd_link_sendpass }}"
recvpass="{{ link.recvpass }}"
{% if 'bind' in link %}bind="{{ link.bind }}"{% endif %}
{% if 'fingerprint' in link %}fingerprint="{{ link.fingerprint }}"{% endif %}
{% if 'hidden' in link %}hidden="{{ link.hidden | ternary('yes', 'no') }}"{% endif %}
{% if 'port' in link %}port="{{ link.port }}"{% endif %}
{% if 'ssl' in link %}ssl="{{ link.ssl }}"{% endif %}
{% if 'statshidden' in link %}statshidden="{{ link.statshidden | ternary('yes', 'no') }}"{% endif %}
{% if 'timeout' in link %}timeout="{{ link.timeout }}"{% endif %}>
{% endfor %}
{% for uline in inspircd_ulines %}
<uline
server="{{ uline.server }}"
{% if 'silent' in uline %}silent="{{ uline.silent | ternary('yes', 'no') }}"{% endif %}>
{% endfor %}
{% endif %}
#
# OPERS
#
{% for name, cls in inspircd_oper_classes.items() %}
<class
name="{{ name }}"
{% if 'commands' in cls %}commands="{{ cls.commands | join(' ') }}"{% endif %}
{% if 'privs' in cls %}privs="{{ cls.privs | join(' ') }}"{% endif %}
{% if 'chanmodes' in cls %}chanmodes="{{ cls.chanmodes }}"{% endif %}
{% if 'usermodes' in cls %}usermodes="{{ cls.usermodes }}"{% endif %}
{% if 'snomasks' in cls %}snomasks="{{ cls.snomasks }}"{% endif %}>
{% endfor %}
{% for name, type in inspircd_oper_types.items() %}
<type
name="{{ name }}"
{% if 'class' in type %}class="{{ cls.class }}"{% endif %}
{% if 'classes' in type %}classes="{{ type.classes | join(' ') }}"{% endif %}
{% if 'vhost' in type %}vhost="{{ type.vhost }}"{% endif %}
{% endfor %}
{% for name, oper in inspircd_opers.items() %}
<oper
name="{{ name }}"
host="{{ oper.host }}"
password="{{ oper.password }}"
type="{{ oper.type }}"
{% if 'class' in oper %}class="{{ oper.class }}"{% endif %}
{% if 'hash' in oper %}hash="{{ hash.class }}"{% endif %}
{% if 'vhost' in oper %}vhost="{{ vhost.class }}"{% endif %}>
{% endfor %}
#
# ADDITIONAL CONFIG
#
{{ inspircd_additional_config }}