From 905928cd9c42e2799f674d07b6514e88a2958da2 Mon Sep 17 00:00:00 2001 From: Zolfa Date: Thu, 7 May 2020 00:25:49 +0200 Subject: [PATCH] roles/icinga2-monitoring: allow remote ssh agents --- roles/icinga2-monitoring/templates/host.conf.j2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/icinga2-monitoring/templates/host.conf.j2 b/roles/icinga2-monitoring/templates/host.conf.j2 index ce4d52c..d3fe77a 100644 --- a/roles/icinga2-monitoring/templates/host.conf.j2 +++ b/roles/icinga2-monitoring/templates/host.conf.j2 @@ -6,6 +6,10 @@ object Host "{{ item.key }}" { vars.os = "Linux" vars.sla = "24x7" +{% if ('agent_type' in item.value) and (item.value.agent_type == 'ssh') %} + vars.agent_type = "ssh" +{% endif %} + {% if 'vhosts' in item.value %} {% for vhost in item.value.vhosts %} vars.http_vhosts["{{ vhost }}"] = {