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.
25 lines
593 B
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
|
|
}
|
|
|