Ingen beskrivning
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

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=present
  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: Determine if ZNC is installed
  14. stat: path=/usr/lib/znc/configs/znc.conf
  15. register: znc_config_file
  16. - name: Copy ZNC monit service config files into place
  17. copy: src=etc_monit_conf.d_znc dest=/etc/monit/conf.d/znc
  18. notify: restart monit
  19. when: znc_config_file.stat.exists == True
  20. - name: Copy monit service config files into place
  21. copy: src=etc_monit_conf.d_{{ item }} dest=/etc/monit/conf.d/{{ item }}
  22. with_items:
  23. - apache2
  24. - dovecot
  25. - pgsql
  26. - postfix
  27. - sshd
  28. - tomcat
  29. notify: restart monit