Browse Source

Merge pull request #490 from mikeashley/znc-fix

Fix znc configuration
Allen Riddell 8 years ago
parent
commit
182ffc5cb4

+ 11
- 0
roles/ircbouncer/files/etc_systemd_system_znc.service View File

1
+[Unit]
2
+Description=ZNC, an IRC bouncer
3
+After=network.target
4
+
5
+[Service]
6
+ExecStart=/usr/bin/znc --datadir=/usr/lib/znc
7
+PIDFile=/var/run/znc/znc.pid
8
+User=znc
9
+
10
+[Install]
11
+WantedBy=multi-user.target

+ 13
- 1
roles/ircbouncer/tasks/znc.yml View File

5
   with_items:
5
   with_items:
6
     - znc
6
     - znc
7
 
7
 
8
+- name: Create znc group
9
+  group: name=znc state=present
10
+
11
+- name: Create znc user
12
+  user: name=znc state=present home=/var/lib/znc system=yes group=znc shell=/usr/sbin/nologin
13
+
14
+- name: Ensure pid directory exists
15
+  file: state=directory path=/var/run/znc group=znc owner=znc
16
+
17
+- name: Copy znc service file into place
18
+  copy: src=etc_systemd_system_znc.service dest=/etc/systemd/system/znc.service mode=0644
19
+
8
 - name: Create a combined version of the private key with public cert and intermediate + root CAs
20
 - name: Create a combined version of the private key with public cert and intermediate + root CAs
9
   shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
21
   shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
10
     /usr/lib/znc/znc.pem creates=/usr/lib/znc/znc.pem
22
     /usr/lib/znc/znc.pem creates=/usr/lib/znc/znc.pem
33
   tags: ufw
45
   tags: ufw
34
 
46
 
35
 - name: Ensure znc is a system service
47
 - name: Ensure znc is a system service
36
-  service: name=znc state=started enabled=true
48
+  service: name=znc state=restarted enabled=true

+ 1
- 1
roles/monitoring/tasks/monit.yml View File

15
   notify: restart monit
15
   notify: restart monit
16
 
16
 
17
 - name: Determine if ZNC is installed
17
 - name: Determine if ZNC is installed
18
-  stat: path=/etc/lib/znc/configs/znc.conf
18
+  stat: path=/usr/lib/znc/configs/znc.conf
19
   register: znc_config_file
19
   register: znc_config_file
20
 
20
 
21
 - name: Copy ZNC monit service config files into place
21
 - name: Copy ZNC monit service config files into place

Loading…
Cancel
Save