diff --git a/playbooks/tasks/web/nagios-ansible.cfg.j2 b/playbooks/tasks/web/nagios-ansible.cfg.j2 index 587881e..d4f0ee9 100644 --- a/playbooks/tasks/web/nagios-ansible.cfg.j2 +++ b/playbooks/tasks/web/nagios-ansible.cfg.j2 @@ -42,9 +42,9 @@ define hostgroup { alias Ansible-managed Hosts } +{% if nagios_commands is defined %} # Commands # Everything here is defined in nagios_commands -{% if nagios_commands is defined %} {% for command in nagios_commands %} define command { command_name {{ command.name }} @@ -58,9 +58,9 @@ define command { {% endfor %} {% endif %} +{% if nagios_services is defined %} # Services # Everything here is defined in nagios_services -{% if nagios_services is defined %} {% for service in nagios_services %} define service { use ansible-generic-service