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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/lamp_haproxy/roles/nagios/templates/webservers.cfg.j2

25 lines
593 B

# {{ ansible_managed }}
define hostgroup {
hostgroup_name webservers
alias Web Servers
}
{% for host in groups['webservers'] %}
define host {
use linux-server
host_name {{ host }}
alias {{ host }}
address {{ hostvars[host].ansible_default_ipv4.address }}
hostgroups webservers
}
{% endfor %}
# service checks to be applied to the web server
define service {
use local-service
hostgroup_name webservers
service_description webserver
check_command check_http
notifications_enabled 0
}