From 869b5a551fc127c0844f0cb2f75ea53f996f10dd Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Tue, 12 May 2020 15:22:55 +0200 Subject: [PATCH] Made host specific pillar more dynamic --- salt/pillars/top.sls | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/salt/pillars/top.sls b/salt/pillars/top.sls index 8dfce2f..9db098a 100644 --- a/salt/pillars/top.sls +++ b/salt/pillars/top.sls @@ -4,5 +4,7 @@ base: - packages - repositories - 'exsilio': - - hosts.exsilio +{% if salt['file.file_exists']('hosts/{0}.sls'.format(grains.id)) %} + '{{ grains.id }}': + - hosts.{{ grains.id }} +{% endif %}