1234567891011121314151617181920212223242526 |
- - name: Install monit
- apt: pkg=monit state=installed
-
- - name: Copy monit master config file into place
- copy: src=etc_monit_monitrc dest=/etc/monit/monitrc
- notify: restart monit
-
- - name: Copy monit service config files into place
- copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
- with_items:
- - apache2
- - dovecot
- - pgsql
- - postfix
- - sshd
- - tomcat
- notify: restart monit
-
- - name: Determine if ZNC is installed
- stat: path=/var/lib/znc/configs/znc.conf
- register: znc_config_file
-
- - name: Copy ZNC monit service config files into place
- copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
- notify: restart monit
- when: znc_config_file.stat.exists == True
|