mirror of
https://github.com/geerlingguy/ansible-role-apache
synced 2025-01-11 12:10:20 +01:00
25 lines
669 B
Django/Jinja
25 lines
669 B
Django/Jinja
# {{ ansible_managed }}
|
|
|
|
define hostgroup {
|
|
hostgroup_name dbservers
|
|
alias Database Servers
|
|
}
|
|
|
|
{% for host in groups['dbservers'] %}
|
|
define host {
|
|
use linux-server
|
|
host_name {{ host }}
|
|
alias {{ host }}
|
|
address {{ hostvars[host].ansible_default_ipv4.address }}
|
|
hostgroups dbservers
|
|
}
|
|
{% endfor %}
|
|
|
|
#define service {
|
|
# use local-service
|
|
# hostgroup_name dbservers
|
|
# service_description MySQL Database Server
|
|
# check_command check_mysql
|
|
# notifications_enabled 0
|
|
#}
|
|
|