|
@@ -24,6 +24,7 @@
|
24
|
24
|
|
25
|
25
|
- name: Build and install znc
|
26
|
26
|
shell: ./configure --enable-python ; make ; make install executable=/bin/bash chdir=/root/znc-{{ znc_version }} creates=/usr/local/bin/znc
|
|
27
|
+ notify: restart znc
|
27
|
28
|
|
28
|
29
|
- name: Create znc group
|
29
|
30
|
group: name=znc state=present
|
|
@@ -37,9 +38,11 @@
|
37
|
38
|
- name: Create a combined version of the private key with public cert and intermediate + root CAs
|
38
|
39
|
shell: cat /etc/ssl/private/wildcard_private.key /etc/ssl/certs/wildcard_combined.pem >
|
39
|
40
|
/var/lib/znc/znc.pem creates=/var/lib/znc/znc.pem
|
|
41
|
+ notify: restart znc
|
40
|
42
|
|
41
|
43
|
- name: Ensure znc user and group can read cert
|
42
|
44
|
file: path=/var/lib/znc/znc.pem group=znc owner=znc mode=640
|
|
45
|
+ notify: restart znc
|
43
|
46
|
|
44
|
47
|
- name: Check for existing config file
|
45
|
48
|
command: cat /var/lib/znc/configs/znc.conf
|
|
@@ -53,6 +56,7 @@
|
53
|
56
|
- name: Copy znc configuration file into place
|
54
|
57
|
template: src=var_lib_znc_configs_znc.conf.j2 dest=/var/lib/znc/configs/znc.conf owner=znc group=znc
|
55
|
58
|
when: znc_config.rc != 0
|
|
59
|
+ notify: restart znc
|
56
|
60
|
|
57
|
61
|
- name: Set firewall rule for znc
|
58
|
62
|
ufw: rule=allow port=6697 proto=tcp
|