Browse Source

Merge pull request #288 from lvillani/issue-284

Merge pull request #288
Alex Payne 10 years ago
parent
commit
9964229936
4 changed files with 12 additions and 5 deletions
  1. 0
    4
      roles/ircbouncer/tasks/znc.yml
  2. 2
    0
      roles/monitoring/README.md
  3. 9
    0
      roles/monitoring/tasks/monit.yml
  4. 1
    1
      site.yml

+ 0
- 4
roles/ircbouncer/tasks/znc.yml View File

@@ -63,7 +63,3 @@
63 63
 
64 64
 - name: Ensure znc is a system service
65 65
   service: name=znc state=started enabled=true
66
-
67
-- name: Copy monit service config files into place
68
-  copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
69
-  notify: restart monit

+ 2
- 0
roles/monitoring/README.md View File

@@ -0,0 +1,2 @@
1
+This role should be enabled last in site.yml since it selectively installs configuration files
2
+based on the execution status of other roles before it.

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

@@ -15,3 +15,12 @@
15 15
     - sshd
16 16
     - tomcat
17 17
   notify: restart monit
18
+
19
+- name: Determine if ZNC is installed
20
+  stat: path=/var/lib/znc/configs/znc.conf
21
+  register: znc_config_file
22
+
23
+- name: Copy ZNC monit service config files into place
24
+  copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
25
+  notify: restart monit
26
+  when: znc_config_file.stat.exists == True

+ 1
- 1
site.yml View File

@@ -16,7 +16,6 @@
16 16
     - blog
17 17
     - ircbouncer
18 18
     - xmpp
19
-    - monitoring
20 19
     - owncloud
21 20
     - vpn
22 21
     - tarsnap
@@ -24,3 +23,4 @@
24 23
     - git
25 24
     - newebe
26 25
     - readlater
26
+    - monitoring  # Monitoring role should be last. See roles/monitoring/README.md

Loading…
Cancel
Save