Geen omschrijving
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

monit.yml 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. - name: Add monitoring vhost to apache
  2. copy: src=etc_apache2_sites-available_00-status.conf dest=/etc/apache2/sites-available/00-status.conf
  3. - name: Enable the status vhost
  4. command: a2ensite 00-status.conf creates=/etc/apache2/sites-enabled/00-status.conf
  5. notify: restart apache
  6. - name: Install monit
  7. apt: pkg=monit state=installed
  8. tags:
  9. - dependencies
  10. - name: Copy monit master config file into place
  11. copy: src=etc_monit_monitrc dest=/etc/monit/monitrc
  12. notify: restart monit
  13. - name: Copy monit service config files into place
  14. copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
  15. with_items:
  16. - apache2
  17. - dovecot
  18. - pgsql
  19. - postfix
  20. - sshd
  21. - tomcat
  22. notify: restart monit
  23. - name: Determine if ZNC is installed
  24. stat: path=/var/lib/znc/configs/znc.conf
  25. register: znc_config_file
  26. - name: Copy ZNC monit service config files into place
  27. copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
  28. notify: restart monit
  29. when: znc_config_file.stat.exists == True