From 80ab2d83124653bd3998e10f702567c741b44c98 Mon Sep 17 00:00:00 2001 From: s3lph <account-gitlab-ideynizv@kernelpanic.lol> Date: Mon, 21 Dec 2020 11:15:15 +0100 Subject: [PATCH] Add inspircd log stanza --- roles/inspircd/defaults/main.yml | 20 +++++++ .../templates/etc/inspircd/inspircd.conf.j2 | 57 +++++++++++++++---- 2 files changed, 65 insertions(+), 12 deletions(-) diff --git a/roles/inspircd/defaults/main.yml b/roles/inspircd/defaults/main.yml index e0f897c..e771050 100644 --- a/roles/inspircd/defaults/main.yml +++ b/roles/inspircd/defaults/main.yml @@ -40,6 +40,26 @@ inspircd_motd: |2 C H H AAAAA N NN G G E M M E CCCC H H A A N N GGGG EEEEE M M EEEEE +inspircd_log_method: file +inspircd_log_types: + - CHANNELS + - COMMAND + - MODE + - MODULE + - SOCKET + - STARTUP + - core_channel + - core_oper + - core_reloadmodule + - m_sasl + - m_spanningtree + - m_ssl_gnutls + - m_sslinfo + - m_topiclock +inspircd_log_level: default +inspircd_log_target: inspircd.log +inspircd_log_flush: 20 + inspircd_gnutls_profiles: {} inspircd_bind: diff --git a/roles/inspircd/templates/etc/inspircd/inspircd.conf.j2 b/roles/inspircd/templates/etc/inspircd/inspircd.conf.j2 index 38034f2..d5f57a7 100644 --- a/roles/inspircd/templates/etc/inspircd/inspircd.conf.j2 +++ b/roles/inspircd/templates/etc/inspircd/inspircd.conf.j2 @@ -34,6 +34,14 @@ <files motd="/etc/inspircd/motd.txt"> +<log + method="{{ inspircd_log_method }}" + type="{{ inspircd_log_types | join(' ') }}" + level="{{ inspircd_log_level }}" + target="{{ inspircd_log_target }}" + flush="{{ inspircd_log_flush }}" +> + {% if 'ssl_gnutls' in inspircd_modules + inspircd_modules_additional %} # # TLS CONFIG @@ -43,18 +51,43 @@ <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 %}> +{% 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 #}