2019-02-06 00:58:46 +00:00
|
|
|
# Configure znc
|
2019-02-04 13:58:54 +00:00
|
|
|
---
|
|
|
|
- name: Create home dirs for znc
|
|
|
|
file:
|
2020-12-27 19:13:19 +00:00
|
|
|
path: /var/lib/znc
|
2019-02-04 13:58:54 +00:00
|
|
|
state: directory
|
|
|
|
owner: znc
|
|
|
|
group: root
|
2021-06-16 05:36:30 +00:00
|
|
|
mode: 0771
|
2019-02-04 13:58:54 +00:00
|
|
|
|
|
|
|
- name: Create znc run dir
|
|
|
|
file:
|
|
|
|
path: /var/run/znc
|
|
|
|
state: directory
|
|
|
|
owner: znc
|
|
|
|
group: root
|
2019-02-04 14:15:40 +00:00
|
|
|
mode: 0770
|
2019-02-04 13:58:54 +00:00
|
|
|
|
2019-02-06 00:58:46 +00:00
|
|
|
- name: Install znc target
|
2019-02-04 13:58:54 +00:00
|
|
|
copy:
|
|
|
|
dest: /etc/systemd/system/znc.service
|
|
|
|
content: |
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=ZNC, an advanced IRC bouncer
|
|
|
|
After=network-online.target
|
|
|
|
|
|
|
|
[Service]
|
2020-12-27 19:13:19 +00:00
|
|
|
ExecStart=/usr/bin/znc -f --datadir=/var/lib/znc
|
2019-02-04 13:58:54 +00:00
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
|
|
User=znc
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
|
2019-03-15 22:21:51 +00:00
|
|
|
- name: Install LE hook
|
|
|
|
copy:
|
2021-05-31 04:57:56 +00:00
|
|
|
src: ../files/etc/letsencrypt/renewal-hooks/deploy/update-znc.pem
|
|
|
|
dest: /etc/letsencrypt/renewal-hooks/deploy/update-znc.pem
|
2019-03-15 22:21:51 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
2020-09-18 11:29:57 +00:00
|
|
|
mode: 0755
|
2021-06-16 14:20:08 +00:00
|
|
|
|
|
|
|
- name: Insert/update configuration
|
|
|
|
blockinfile:
|
|
|
|
dest: /etc/oidentd.conf
|
|
|
|
content: |
|
|
|
|
# ZNC reply with the name of the user that initiated the connection.
|
|
|
|
user "znc"
|
|
|
|
{
|
2021-06-16 14:30:03 +00:00
|
|
|
default
|
2021-06-16 14:50:01 +00:00
|
|
|
{
|
|
|
|
allow spoof
|
|
|
|
allow spoof_all
|
|
|
|
}
|
2021-06-16 14:20:08 +00:00
|
|
|
}
|