From 553ce3e3636438e27940acc5bddbab793d2759eb Mon Sep 17 00:00:00 2001 From: Doug Burks Date: Mon, 12 Oct 2020 10:13:05 -0400 Subject: [PATCH] only include extra_hosts if nodestab exists --- salt/soc/init.sls | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/soc/init.sls b/salt/soc/init.sls index a4f99d92d..012dae330 100644 --- a/salt/soc/init.sls +++ b/salt/soc/init.sls @@ -56,8 +56,8 @@ so-soc: - /opt/so/conf/soc/soc.json:/opt/sensoroni/sensoroni.json:ro - /opt/so/conf/soc/changes.json:/opt/sensoroni/html/changes.json:ro - /opt/so/log/soc/:/opt/sensoroni/logs/:rw - - extra_hosts: {%- if salt['pillar.get']('nodestab', {}) %} + - extra_hosts: {%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %} - {{ SN.split('_')|first }}:{{ SNDATA.ip }} {%- endfor %} @@ -125,4 +125,4 @@ soc_state_not_allowed: test.fail_without_changes: - name: soc_state_not_allowed -{% endif %} \ No newline at end of file +{% endif %}