mirror of
https://github.com/HanXHX/ansible-nginx.git
synced 2026-02-24 09:03:29 +07:00
Nagios OK on FreeBSD
This commit is contained in:
@@ -1,2 +1,31 @@
|
||||
---
|
||||
|
||||
- name: APT | Install web apps
|
||||
pkgng: pkg={{ item }} state=present
|
||||
with_items:
|
||||
- nagios
|
||||
- backuppc
|
||||
|
||||
- name: COMMAND | Activate backuppc config
|
||||
command: >
|
||||
cp /usr/local/etc/backuppc/config.pl.sample /usr/local/etc/backuppc/config.pl
|
||||
creates=/usr/local/etc/backuppc/config.pl
|
||||
|
||||
- name: FILE | Fix backuppc permissions
|
||||
file: >
|
||||
path=/usr/local/etc/backuppc/config.pl
|
||||
owner=backuppc
|
||||
group=backuppc
|
||||
|
||||
- name: FILE | Fix fcgiwrap permission
|
||||
file: >
|
||||
path={{ nginx_fcgiwrap_sock }}
|
||||
mode=0640
|
||||
owner={{ nginx_user }}
|
||||
group={{ nginx_user }}
|
||||
|
||||
#
|
||||
# We don't manage BackupPC on FreeBSD... too dirty. :/
|
||||
#
|
||||
#- name: SERVICE | Ensure backuppc is started
|
||||
# service: name=backuppc state=started enabled=yes
|
||||
|
||||
@@ -262,6 +262,7 @@
|
||||
changed_when: false
|
||||
register: authbpc
|
||||
failed_when: authbpc.stdout.find('BackupPC Server Status') == -1
|
||||
when: ansible_distribution != 'FreeBSD'
|
||||
|
||||
# --------------------------------
|
||||
# Nagios
|
||||
@@ -272,7 +273,7 @@
|
||||
register: nagios_php
|
||||
failed_when: nagios_php.stdout.find('Nagios Core') == -1
|
||||
- name: -- VERIFY NAGIOS3 CGI --
|
||||
command: "curl -u nagiosadmin:nagios -H 'Host: nagios3.local' http://127.0.0.1/cgi-bin/nagios3/summary.cgi"
|
||||
command: "curl -u nagiosadmin:nagios -H 'Host: nagios3.local' http://127.0.0.1/cgi-bin{% if ansible_distribution == 'Debian' %}/nagios3{% endif %}/summary.cgi"
|
||||
changed_when: false
|
||||
register: nagios_cgi
|
||||
failed_when: nagios_cgi.stdout.find('Nagios Event Summary') == -1
|
||||
|
||||
Reference in New Issue
Block a user