ansible-role-nagios/templates/templates_template.j2

72 lines
2.4 KiB
Django/Jinja

###############################################################################
# MANAGED BY ANSIBLE!!
# TEMPLATES.CFG - SAMPLE OBJECT TEMPLATES
#
#
# NOTES: This config file provides you with some example object definition
# templates that are refered by other host, service, contact, etc.
# definitions in other config files.
#
# You don't need to keep these definitions in a separate file from your
# other object definitions. This has been done just to make things
# easier to understand.
#
###############################################################################
{% if templates.contacts is defined %}
###############################################################################
###############################################################################
#
# CONTACT TEMPLATES
#
###############################################################################
###############################################################################
# Generic contact definition template - This is NOT a real contact, just a template!
{% for contact in templates.contacts %}
define contact{
{% for key, value in contact.items() %}
{{ key }} {{ value }}
{% endfor %}
}
{% endfor %}
{% endif %}
{% if templates.hosts is defined %}
###############################################################################
###############################################################################
#
# HOSTS TEMPLATES
#
###############################################################################
###############################################################################
# Generic host definition template - This is NOT a real host, just a template!
{% for host in templates.hosts %}
define host{
{% for key, value in host.items() %}
{{ key }} {{ value }}
{% endfor %}
}
{% endfor %}
{% endif %}
{% if templates.contacts is defined %}
###############################################################################
###############################################################################
#
# SERVICE TEMPLATES
#
###############################################################################
###############################################################################
# Generic service definition template - This is NOT a real service, just a template!
{% for service in templates.services %}
define service{
{% for key, value in service.items() %}
{{ key }} {{ value }}
{% endfor %}
}
{% endfor %}
{% endif %}