Drop Nagios support
parent
87c1c68949
commit
d168219c29
|
@ -15,4 +15,3 @@ Sites not tested
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
- BackupPC
|
- BackupPC
|
||||||
- Nagios
|
|
||||||
|
|
|
@ -42,7 +42,6 @@ Templates
|
||||||
- `_backuppc`: access to [BackupPC](http://backuppc.sourceforge.net/) (be careful: you need to install [fcgiwrap](https://packages.debian.org/jessie/fcgiwrap))
|
- `_backuppc`: access to [BackupPC](http://backuppc.sourceforge.net/) (be careful: you need to install [fcgiwrap](https://packages.debian.org/jessie/fcgiwrap))
|
||||||
- `_dokuwiki`
|
- `_dokuwiki`
|
||||||
- `_redirect`: should not be called explicitly
|
- `_redirect`: should not be called explicitly
|
||||||
- `_nagios3`: access to Nagios3 (be careful: you need to install [fcgiwrap](https://packages.debian.org/jessie/fcgiwrap))
|
|
||||||
- `_phalcon`: Phalcon PHP Framework
|
- `_phalcon`: Phalcon PHP Framework
|
||||||
- `_php`: PHP base template. Can work with many frameworks/tools
|
- `_php`: PHP base template. Can work with many frameworks/tools
|
||||||
- `_php_index`: Same as above. But you can only run index.php
|
- `_php_index`: Same as above. But you can only run index.php
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
{% extends "_php.j2" %}
|
|
||||||
|
|
||||||
{% block root %}
|
|
||||||
root {{ nginx_nagios_root }};
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block template_try_files %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block template_index %}
|
|
||||||
index index.php index.html;
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block template_headers %}
|
|
||||||
# --> Custom headers
|
|
||||||
{% for key, value in __headers.iteritems() %}
|
|
||||||
{% if key == "X-Frame-Options" %}
|
|
||||||
# X-Frame-Options forced by Ansible
|
|
||||||
add_header {{ key }} "SAMEORIGIN"{% if nginx_version.stdout | version_compare('1.7.5', 'ge') %} always{% endif %};
|
|
||||||
{% else %}
|
|
||||||
add_header {{ key }} "{{ value | replace(' always', '') }}"{% if nginx_version.stdout | version_compare('1.7.5', 'ge') and ' always' in value %} always{% endif %};
|
|
||||||
{% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
# <-- Custom headers
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
{% block template_local_content %}
|
|
||||||
location ~ /\.ht {
|
|
||||||
deny all;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /stylesheets {
|
|
||||||
{% if nginx_nagios_stylesheets is defined %}
|
|
||||||
alias {{ nginx_nagios_stylesheets }};
|
|
||||||
{% endif %}
|
|
||||||
expires 60d;
|
|
||||||
}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block template_upstream_location %}
|
|
||||||
{% if ansible_distribution == 'Debian' %}
|
|
||||||
location /cgi-bin/nagios3 {
|
|
||||||
root /usr/lib;
|
|
||||||
{% elif ansible_distribution == 'FreeBSD' %}
|
|
||||||
location /cgi-bin {
|
|
||||||
{% endif %}
|
|
||||||
try_files $uri =404;
|
|
||||||
include fastcgi.conf;
|
|
||||||
fastcgi_pass unix:{{ nginx_fcgiwrap_sock }};
|
|
||||||
fastcgi_param AUTH_USER $remote_user;
|
|
||||||
fastcgi_param REMOTE_USER $remote_user;
|
|
||||||
}
|
|
||||||
location ~ \.php$ {
|
|
||||||
fastcgi_pass {{ php_upstream }};
|
|
||||||
fastcgi_index index.php;
|
|
||||||
include fastcgi.conf;
|
|
||||||
}
|
|
||||||
{% endblock %}
|
|
|
@ -8,12 +8,6 @@
|
||||||
with_items:
|
with_items:
|
||||||
- backuppc
|
- backuppc
|
||||||
|
|
||||||
- name: APT | Install nagios3 (only on old Debian releases)
|
|
||||||
apt:
|
|
||||||
pkg: nagios3
|
|
||||||
state: present
|
|
||||||
when: ansible_distribution_major_version | version_compare('9', 'lt')
|
|
||||||
|
|
||||||
- name: SERVICE | Ensure backuppc is started
|
- name: SERVICE | Ensure backuppc is started
|
||||||
service:
|
service:
|
||||||
name: backuppc
|
name: backuppc
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
# pkg: "{{ item }}"
|
# pkg: "{{ item }}"
|
||||||
# state: present
|
# state: present
|
||||||
# with_items:
|
# with_items:
|
||||||
# - nagios
|
|
||||||
# - backuppc
|
# - backuppc
|
||||||
#
|
#
|
||||||
#- name: COMMAND | Activate backuppc config
|
#- name: COMMAND | Activate backuppc config
|
||||||
|
@ -19,13 +18,6 @@
|
||||||
# owner: backuppc
|
# owner: backuppc
|
||||||
# group: 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. :/
|
# We don't manage BackupPC on FreeBSD... too dirty. :/
|
||||||
#
|
#
|
||||||
|
|
|
@ -60,11 +60,6 @@
|
||||||
state: 'absent'
|
state: 'absent'
|
||||||
- name: 'hanx'
|
- name: 'hanx'
|
||||||
password: 'qwerty'
|
password: 'qwerty'
|
||||||
- name: 'nagios'
|
|
||||||
description: 'Please login to Nagios!'
|
|
||||||
users:
|
|
||||||
- name: 'nagiosadmin'
|
|
||||||
password: 'nagios'
|
|
||||||
- name: 'deleteme'
|
- name: 'deleteme'
|
||||||
description: 'Please login!'
|
description: 'Please login!'
|
||||||
users: []
|
users: []
|
||||||
|
@ -221,9 +216,6 @@
|
||||||
- name: 'backuppc.local'
|
- name: 'backuppc.local'
|
||||||
template: '_backuppc'
|
template: '_backuppc'
|
||||||
htpasswd: 'hello'
|
htpasswd: 'hello'
|
||||||
- name: 'nagios3.local'
|
|
||||||
template: '_nagios3'
|
|
||||||
htpasswd: 'nagios'
|
|
||||||
- name: 'test-ssl.local'
|
- name: 'test-ssl.local'
|
||||||
proto: ['http', 'https']
|
proto: ['http', 'https']
|
||||||
template: '_base'
|
template: '_base'
|
||||||
|
@ -428,33 +420,6 @@
|
||||||
when: ansible_distribution != 'FreeBSD'
|
when: ansible_distribution != 'FreeBSD'
|
||||||
failed_when: authbpc.content.find('BackupPC Server Status') == -1
|
failed_when: authbpc.content.find('BackupPC Server Status') == -1
|
||||||
|
|
||||||
# --------------------------------
|
|
||||||
# Nagios (not avaiblable on Debian >= 9 and not tested on FreeBSD)
|
|
||||||
# --------------------------------
|
|
||||||
- block:
|
|
||||||
|
|
||||||
- name: -- VERIFY NAGIOS3 PHP --
|
|
||||||
uri:
|
|
||||||
url: "http://nagios3.local/side.php"
|
|
||||||
user: "nagiosadmin"
|
|
||||||
password: "nagios"
|
|
||||||
force_basic_auth: yes
|
|
||||||
return_content: yes
|
|
||||||
register: nagios_php
|
|
||||||
failed_when: nagios_php.content.find('Nagios Core') == -1
|
|
||||||
|
|
||||||
- name: -- VERIFY NAGIOS3 CGI --
|
|
||||||
uri:
|
|
||||||
url: "http://nagios3.local/cgi-bin{% if ansible_distribution == 'Debian' %}/nagios3{% endif %}/summary.cgi"
|
|
||||||
user: "nagiosadmin"
|
|
||||||
password: "nagios"
|
|
||||||
force_basic_auth: yes
|
|
||||||
return_content: yes
|
|
||||||
register: nagios_cgi
|
|
||||||
failed_when: nagios_cgi.content.find('Nagios Event Summary') == -1
|
|
||||||
|
|
||||||
when: ansible_distribution == 'Debian' and ansible_distribution_major_version | version_compare('9', 'lt')
|
|
||||||
|
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
# SSL
|
# SSL
|
||||||
# --------------------------------
|
# --------------------------------
|
||||||
|
|
|
@ -3,6 +3,4 @@ nginx_pid: '/run/nginx.pid'
|
||||||
nginx_etc_dir: '/etc/nginx'
|
nginx_etc_dir: '/etc/nginx'
|
||||||
|
|
||||||
# Specific sites
|
# Specific sites
|
||||||
nginx_nagios_root: '/usr/share/nagios3/htdocs'
|
|
||||||
nginx_nagios_stylesheets: '/etc/nagios3/stylesheets'
|
|
||||||
nginx_fcgiwrap_sock: '/var/run/fcgiwrap.socket'
|
nginx_fcgiwrap_sock: '/var/run/fcgiwrap.socket'
|
||||||
|
|
|
@ -3,7 +3,6 @@ nginx_pid: '/var/run/nginx.pid'
|
||||||
nginx_etc_dir: '/usr/local/etc/nginx'
|
nginx_etc_dir: '/usr/local/etc/nginx'
|
||||||
|
|
||||||
# Specific sites
|
# Specific sites
|
||||||
nginx_nagios_root: '/usr/local/www/nagios'
|
|
||||||
nginx_fcgiwrap_sock: '/var/run/fcgiwrap/fcgiwrap.sock'
|
nginx_fcgiwrap_sock: '/var/run/fcgiwrap/fcgiwrap.sock'
|
||||||
|
|
||||||
nginx_acmesh_bin: '/usr/local/sbin/acme.sh'
|
nginx_acmesh_bin: '/usr/local/sbin/acme.sh'
|
||||||
|
|
|
@ -41,7 +41,6 @@ nginx_dirs:
|
||||||
|
|
||||||
nginx_templates_no_dir:
|
nginx_templates_no_dir:
|
||||||
- '_backuppc'
|
- '_backuppc'
|
||||||
- '_nagios3'
|
|
||||||
- '_proxy'
|
- '_proxy'
|
||||||
|
|
||||||
nginx_servers_default_headers:
|
nginx_servers_default_headers:
|
||||||
|
|
Loading…
Reference in New Issue