Browse Source

Makes more sense to put ZNC config file into place first

Alex Payne 9 years ago
parent
commit
85be39c073
1 changed files with 9 additions and 8 deletions
  1. 9
    8
      roles/monitoring/tasks/monit.yml

+ 9
- 8
roles/monitoring/tasks/monit.yml View File

14
   copy: src=etc_monit_monitrc dest=/etc/monit/monitrc
14
   copy: src=etc_monit_monitrc dest=/etc/monit/monitrc
15
   notify: restart monit
15
   notify: restart monit
16
 
16
 
17
+- name: Determine if ZNC is installed
18
+  stat: path=/etc/lib/znc/configs/znc.conf
19
+  register: znc_config_file
20
+
21
+- name: Copy ZNC monit service config files into place
22
+  copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
23
+  notify: restart monit
24
+  when: znc_config_file.stat.exists == True
25
+
17
 - name: Copy monit service config files into place
26
 - name: Copy monit service config files into place
18
   copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
27
   copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
19
   with_items:
28
   with_items:
25
     - tomcat
34
     - tomcat
26
   notify: restart monit
35
   notify: restart monit
27
 
36
 
28
-- name: Determine if ZNC is installed
29
-  stat: path=/var/lib/znc/configs/znc.conf
30
-  register: znc_config_file
31
-
32
-- name: Copy ZNC monit service config files into place
33
-  copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
34
-  notify: restart monit
35
-  when: znc_config_file.stat.exists == True

Loading…
Cancel
Save