mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-07-26 16:41:07 +08:00
Don't change the template name, or it will be the name of the remote file
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
@@ -498,10 +498,10 @@
|
||||
- nagios_config
|
||||
notify: Restart nagios
|
||||
|
||||
- name: Build out nagios hostgroup templates (iad2)
|
||||
- name: Build out nagios hostgroup templates
|
||||
ansible.builtin.template: src=nagios/hostgroups/{{item}}.j2 dest=/etc/nagios/hostgroups/{{item}} mode=0644 owner=root group=root
|
||||
with_items:
|
||||
- "all.cfg.{{datacenter}}"
|
||||
- all.cfg
|
||||
- vpnclients.cfg
|
||||
- nomail.cfg
|
||||
- checkswap.cfg
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
define hostgroup{
|
||||
hostgroup_name {{ key }}
|
||||
alias {{ key }}
|
||||
{%- for host in groups[key]|sort if hostvars[host].nagios_Can_Connect == true and hostvars[host].datacenter == 'iad2' %}
|
||||
{%- for host in groups[key]|sort if hostvars[host].nagios_Can_Connect == true and '.iad2.' in hostvars[host].inventory_hostname %}
|
||||
{% if loop.first +%}
|
||||
members {{ host }}{% else %}, {{ host }}{% endif %}
|
||||
{% endfor +%}
|
||||
|
||||
Reference in New Issue
Block a user