From 00d311cd6ca9b34f8354f427dcbc9f4c93b4a84b Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 23 Jul 2021 14:40:44 -0400 Subject: [PATCH] fix nodetype listing --- salt/grafana/init.sls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/grafana/init.sls b/salt/grafana/init.sls index ee2086b5f..00c32fb90 100644 --- a/salt/grafana/init.sls +++ b/salt/grafana/init.sls @@ -16,7 +16,8 @@ {% if grains.role == 'so-eval' %} {% do DASHBOARDS.append('eval') %} {% else %} - {% for dashboard in salt['cmd.run']("ls /opt/so/saltstack/local/pillar/minions/").split('_').last().split('.')[0]| unique %} + {# Grab a unique listing of nodetypes that exists so that we create only the needed dashboards #} + {% for dashboard in salt['cmd.shell']("ls /opt/so/saltstack/local/pillar/minions/|awk -F'_' {'print $2'}|awk -F'.' {'print $1'}|uniq").split() %} {% do DASHBOARDS.append(dashboard) %} {% endfor %} {% endif %}