From fa8c430a53885c911f87b32f413d579bff5795ab Mon Sep 17 00:00:00 2001 From: shirenn Date: Fri, 25 Jun 2021 14:52:06 +0200 Subject: [PATCH] [inspircd] PEPCRANS + prevent diffs --- host_vars/irc.adm.crans.org.yml | 59 ++++++++- roles/anope/templates/anope/services.conf.j2 | 44 +++--- .../templates/inspircd/inspircd.conf.j2 | 125 ++++-------------- .../inspircd/templates/inspircd/links.conf.j2 | 10 +- .../templates/inspircd/modules.conf.j2 | 8 +- 5 files changed, 116 insertions(+), 130 deletions(-) diff --git a/host_vars/irc.adm.crans.org.yml b/host_vars/irc.adm.crans.org.yml index b75e160f..17426494 100644 --- a/host_vars/irc.adm.crans.org.yml +++ b/host_vars/irc.adm.crans.org.yml @@ -27,10 +27,67 @@ loc_thelounge: public: "true" loc_inspircd: - cloak_key: "{{ vault.irc_inspircd_cloak_key }}" + cloak: + name: crans + key: "{{ vault.irc_inspircd_cloak_key }}" diepass: "{{ vault.irc_inspircd_diepass }}" restartpass: "{{ vault.irc_inspircd_restartpass }}" opers: "{{ vault.irc_inspircd_opers }}" + server: + name: irc.crans.org + description: Crans IRC server + network: Crans + admin: + name: Pierre-Elliott Bécue + nick: PEB + email: root@crans.org + bind: + - address: 185.230.79.11 + type: clients + clair: 6667 + ssl: 6697 + - address: 2a0c:700:2::ff:fe01:2902 + type: clients + clair: 6667 + ssl: 6697 + - address : 172.16.10.129 + type: clients + clair: 6667 + - address: 127.0.0.1 + type: servers + clair: 6668 + connect: + - name: zamok + allows: + ipv4: 185.230.79.1/32 + ipv6: 2a0c:700:2:0:ec4:7aff:fe59:a1ad/128 + threshold: 1 + - name: irc + allows: + ipv4: 185.230.79.11/32 + ipv6: 2a0c:700:2::ff:fe01:2902/128 + threshold: 1 + - name: gitlab + allows: + ipv4: 185.230.79.14/32 + ipv6: 2a0c:700:2::ff:fe01:502/128 + threshold: 10 + commandrate: 10000 + - name: monitoring + allows: + ipv4: 172.16.10.121/32 + ipv6: fd00::10:ff:fe01:2110/128 + threshold: 10 + commandrate: 10000 + modes: yes + dns: 185.230.79.62 + services: + name: services.irc.crans.org + port: 6668 + recvpass: "{{ vault.irc_anope_recvpass }}" + sendpass: "{{ vault.irc_anope_sendpass }}" + + loc_anope: recvpass: "{{ vault.irc_anope_recvpass }}" diff --git a/roles/anope/templates/anope/services.conf.j2 b/roles/anope/templates/anope/services.conf.j2 index e16e42b5..1abcc2c7 100644 --- a/roles/anope/templates/anope/services.conf.j2 +++ b/roles/anope/templates/anope/services.conf.j2 @@ -891,33 +891,35 @@ opertype * As with all permissions, make sure to only give trustworthy people access to Services. */ -oper -{ - /* The nickname of this services oper */ - name = "Fardale" +/* + * oper + * { + * /* The nickname of this services oper */ + * name = "nick" - /* The opertype this person will have */ - type = "Services Root" + * /* The opertype this person will have */ + * type = "Services Root" - /* If set, the user must be an oper on the IRCd to gain their Services - * oper privileges. - */ - require_oper = yes + * /* If set, the user must be an oper on the IRCd to gain their Services + * * oper privileges. + * */ + * require_oper = yes - /* An optional password. If defined the user must login using "/msg OperServ LOGIN" first */ - #password = "secret" + * /* An optional password. If defined the user must login using "/msg OperServ LOGIN" first */ + * #password = "secret" - /* An optional SSL fingerprint. If defined, it's required to be able to use this opertype. */ - #certfp = "ed3383b3f7d74e89433ddaa4a6e5b2d7" + * /* An optional SSL fingerprint. If defined, it's required to be able to use this opertype. */ + * #certfp = "ed3383b3f7d74e89433ddaa4a6e5b2d7" - /* An optional list of user@host masks. If defined the user must be connected from one of them */ - #host = "*@*.anope.org ident@*" + * /* An optional list of user@host masks. If defined the user must be connected from one of them */ + * #host = "*@*.anope.org ident@*" - /* An optional vHost to set on users who identify for this oper block. - * This will override HostServ vHosts, and may not be available on all IRCds - */ - #vhost = "oper.mynet" -} + * /* An optional vHost to set on users who identify for this oper block. + * * This will override HostServ vHosts, and may not be available on all IRCds + * */ + * #vhost = "oper.mynet" + * } + */ {% for oper in anope.services_roots %} oper diff --git a/roles/inspircd/templates/inspircd/inspircd.conf.j2 b/roles/inspircd/templates/inspircd/inspircd.conf.j2 index 1d98c670..3a0fa885 100644 --- a/roles/inspircd/templates/inspircd/inspircd.conf.j2 +++ b/roles/inspircd/templates/inspircd/inspircd.conf.j2 @@ -9,21 +9,21 @@ target="/var/log/inspircd.log" > - - + - - - - - - +{% for bind in inspircd.bind %} + +{% if bind.ssl is defined %} + +{% endif %} +{% endfor %} - + globalmax="1000"{% if connect.modes is not defined %}> +{% else %} - - - - - - - - - - - - - +{% endif %} +{% endfor %} +{% endfor %} - + - + diff --git a/roles/inspircd/templates/inspircd/modules.conf.j2 b/roles/inspircd/templates/inspircd/modules.conf.j2 index 25e3eb02..ab311ad3 100644 --- a/roles/inspircd/templates/inspircd/modules.conf.j2 +++ b/roles/inspircd/templates/inspircd/modules.conf.j2 @@ -24,8 +24,8 @@ -# -# + + #