From 52f97f97ec00dc615038196d05f436119e67cf0a Mon Sep 17 00:00:00 2001 From: Robert Fairburn Date: Tue, 2 Nov 2021 09:14:12 -0500 Subject: [PATCH] fix(master): master.d template to support saltclass ext_pillar --- salt/files/master.d/f_defaults.conf | 4 ++++ test/salt/pillar/salt.sls | 2 ++ 2 files changed, 6 insertions(+) diff --git a/salt/files/master.d/f_defaults.conf b/salt/files/master.d/f_defaults.conf index 83e6e1851..a1e6bae74 100644 --- a/salt/files/master.d/f_defaults.conf +++ b/salt/files/master.d/f_defaults.conf @@ -1207,12 +1207,16 @@ ext_pillar: {%- for parameter in pillar[key] %} {%- if parameter is iterable and parameter is not string %} {%- for param, children in parameter.items() %} + {%- if children is string %} + - {{ param }}: {{ children }} + {%- else %} - {{ param }}: {%- for child in children %} {%- for key, value in child.items() %} - {{ key }}: {{ value }} {%- endfor -%} {%- endfor -%} + {%- endif -%} {%- endfor -%} {%- else %} - {{ parameter }} diff --git a/test/salt/pillar/salt.sls b/test/salt/pillar/salt.sls index 91e0339a3..84465481f 100644 --- a/test/salt/pillar/salt.sls +++ b/test/salt/pillar/salt.sls @@ -18,6 +18,8 @@ salt: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass minion: master: localhost fileserver_backend: