From 5b7d7ea70e19a9c27b5de96eb0752db4534bc62d 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/integration/default/files/_mapdata/almalinux-8.yaml | 2 ++ test/integration/default/files/_mapdata/amazonlinux-2.yaml | 2 ++ test/integration/default/files/_mapdata/arch-base-latest.yaml | 2 ++ test/integration/default/files/_mapdata/centos-7.yaml | 2 ++ test/integration/default/files/_mapdata/centos-8.yaml | 2 ++ test/integration/default/files/_mapdata/debian-10.yaml | 2 ++ test/integration/default/files/_mapdata/debian-11.yaml | 2 ++ test/integration/default/files/_mapdata/debian-9.yaml | 2 ++ test/integration/default/files/_mapdata/fedora-33.yaml | 2 ++ test/integration/default/files/_mapdata/fedora-34.yaml | 2 ++ test/integration/default/files/_mapdata/freebsd-12.yaml | 2 ++ test/integration/default/files/_mapdata/freebsd-13.yaml | 2 ++ test/integration/default/files/_mapdata/gentoo-2-sysd.yaml | 2 ++ test/integration/default/files/_mapdata/gentoo-2-sysv.yaml | 2 ++ test/integration/default/files/_mapdata/openbsd-6.yaml | 2 ++ test/integration/default/files/_mapdata/openbsd-7.yaml | 2 ++ test/integration/default/files/_mapdata/opensuse-15.yaml | 2 ++ .../default/files/_mapdata/opensuse-tumbleweed.yaml | 2 ++ test/integration/default/files/_mapdata/oraclelinux-7.yaml | 2 ++ test/integration/default/files/_mapdata/oraclelinux-8.yaml | 2 ++ test/integration/default/files/_mapdata/rockylinux-8.yaml | 2 ++ test/integration/default/files/_mapdata/ubuntu-18.yaml | 2 ++ test/integration/default/files/_mapdata/ubuntu-20.yaml | 2 ++ test/integration/default/files/_mapdata/windows-10.yaml | 2 ++ .../default/files/_mapdata/windows-2016-server.yaml | 2 ++ .../default/files/_mapdata/windows-2019-server.yaml | 2 ++ test/integration/default/files/_mapdata/windows-8.yaml | 2 ++ test/salt/pillar/salt.sls | 2 ++ 29 files changed, 60 insertions(+) diff --git a/salt/files/master.d/f_defaults.conf b/salt/files/master.d/f_defaults.conf index 83e6e18..a1e6bae 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/integration/default/files/_mapdata/almalinux-8.yaml b/test/integration/default/files/_mapdata/almalinux-8.yaml index 956399a..b24538b 100644 --- a/test/integration/default/files/_mapdata/almalinux-8.yaml +++ b/test/integration/default/files/_mapdata/almalinux-8.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/amazonlinux-2.yaml b/test/integration/default/files/_mapdata/amazonlinux-2.yaml index ec71e2c..175f200 100644 --- a/test/integration/default/files/_mapdata/amazonlinux-2.yaml +++ b/test/integration/default/files/_mapdata/amazonlinux-2.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/arch-base-latest.yaml b/test/integration/default/files/_mapdata/arch-base-latest.yaml index 8b61ed1..798f5ff 100644 --- a/test/integration/default/files/_mapdata/arch-base-latest.yaml +++ b/test/integration/default/files/_mapdata/arch-base-latest.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/centos-7.yaml b/test/integration/default/files/_mapdata/centos-7.yaml index 27384e1..72ccc36 100644 --- a/test/integration/default/files/_mapdata/centos-7.yaml +++ b/test/integration/default/files/_mapdata/centos-7.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/centos-8.yaml b/test/integration/default/files/_mapdata/centos-8.yaml index 48fd718..60fc46f 100644 --- a/test/integration/default/files/_mapdata/centos-8.yaml +++ b/test/integration/default/files/_mapdata/centos-8.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/debian-10.yaml b/test/integration/default/files/_mapdata/debian-10.yaml index 5abb955..e3d07ce 100644 --- a/test/integration/default/files/_mapdata/debian-10.yaml +++ b/test/integration/default/files/_mapdata/debian-10.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/debian-11.yaml b/test/integration/default/files/_mapdata/debian-11.yaml index b07887c..efce8f0 100644 --- a/test/integration/default/files/_mapdata/debian-11.yaml +++ b/test/integration/default/files/_mapdata/debian-11.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/debian-9.yaml b/test/integration/default/files/_mapdata/debian-9.yaml index 073288e..3b6ae30 100644 --- a/test/integration/default/files/_mapdata/debian-9.yaml +++ b/test/integration/default/files/_mapdata/debian-9.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/fedora-33.yaml b/test/integration/default/files/_mapdata/fedora-33.yaml index b8b3ea4..4187c7e 100644 --- a/test/integration/default/files/_mapdata/fedora-33.yaml +++ b/test/integration/default/files/_mapdata/fedora-33.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/fedora-34.yaml b/test/integration/default/files/_mapdata/fedora-34.yaml index e5de1bb..cad618d 100644 --- a/test/integration/default/files/_mapdata/fedora-34.yaml +++ b/test/integration/default/files/_mapdata/fedora-34.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/freebsd-12.yaml b/test/integration/default/files/_mapdata/freebsd-12.yaml index 138acb4..646dae7 100644 --- a/test/integration/default/files/_mapdata/freebsd-12.yaml +++ b/test/integration/default/files/_mapdata/freebsd-12.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/freebsd-13.yaml b/test/integration/default/files/_mapdata/freebsd-13.yaml index 67f12e7..88360b6 100644 --- a/test/integration/default/files/_mapdata/freebsd-13.yaml +++ b/test/integration/default/files/_mapdata/freebsd-13.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml index bc68d65..5de1282 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysd.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml index bc68d65..5de1282 100644 --- a/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml +++ b/test/integration/default/files/_mapdata/gentoo-2-sysv.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/openbsd-6.yaml b/test/integration/default/files/_mapdata/openbsd-6.yaml index 4279c6c..56605f5 100644 --- a/test/integration/default/files/_mapdata/openbsd-6.yaml +++ b/test/integration/default/files/_mapdata/openbsd-6.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/openbsd-7.yaml b/test/integration/default/files/_mapdata/openbsd-7.yaml index b47c83a..4d71f3b 100644 --- a/test/integration/default/files/_mapdata/openbsd-7.yaml +++ b/test/integration/default/files/_mapdata/openbsd-7.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/opensuse-15.yaml b/test/integration/default/files/_mapdata/opensuse-15.yaml index b9dc605..9f847a9 100644 --- a/test/integration/default/files/_mapdata/opensuse-15.yaml +++ b/test/integration/default/files/_mapdata/opensuse-15.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml index 135d277..2efb4b0 100644 --- a/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml +++ b/test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/oraclelinux-7.yaml b/test/integration/default/files/_mapdata/oraclelinux-7.yaml index 2d73683..6ae2694 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-7.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-7.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/oraclelinux-8.yaml b/test/integration/default/files/_mapdata/oraclelinux-8.yaml index 0e168eb..e017bea 100644 --- a/test/integration/default/files/_mapdata/oraclelinux-8.yaml +++ b/test/integration/default/files/_mapdata/oraclelinux-8.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/rockylinux-8.yaml b/test/integration/default/files/_mapdata/rockylinux-8.yaml index 0b68d7c..84cdc26 100644 --- a/test/integration/default/files/_mapdata/rockylinux-8.yaml +++ b/test/integration/default/files/_mapdata/rockylinux-8.yaml @@ -51,6 +51,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/ubuntu-18.yaml b/test/integration/default/files/_mapdata/ubuntu-18.yaml index 743b9df..1bd6744 100644 --- a/test/integration/default/files/_mapdata/ubuntu-18.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-18.yaml @@ -52,6 +52,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/ubuntu-20.yaml b/test/integration/default/files/_mapdata/ubuntu-20.yaml index 79255fa..87eb437 100644 --- a/test/integration/default/files/_mapdata/ubuntu-20.yaml +++ b/test/integration/default/files/_mapdata/ubuntu-20.yaml @@ -52,6 +52,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass file_roots: base: - /srv/salt diff --git a/test/integration/default/files/_mapdata/windows-10.yaml b/test/integration/default/files/_mapdata/windows-10.yaml index 8facd4a..42141c6 100644 --- a/test/integration/default/files/_mapdata/windows-10.yaml +++ b/test/integration/default/files/_mapdata/windows-10.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: "/srv/saltclass" file_roots: base: - "/srv/salt" diff --git a/test/integration/default/files/_mapdata/windows-2016-server.yaml b/test/integration/default/files/_mapdata/windows-2016-server.yaml index d67bd4e..87d32e6 100644 --- a/test/integration/default/files/_mapdata/windows-2016-server.yaml +++ b/test/integration/default/files/_mapdata/windows-2016-server.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: "/srv/saltclass" file_roots: base: - "/srv/salt" diff --git a/test/integration/default/files/_mapdata/windows-2019-server.yaml b/test/integration/default/files/_mapdata/windows-2019-server.yaml index b3c8e5e..df3cc51 100644 --- a/test/integration/default/files/_mapdata/windows-2019-server.yaml +++ b/test/integration/default/files/_mapdata/windows-2019-server.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: "/srv/saltclass" file_roots: base: - "/srv/salt" diff --git a/test/integration/default/files/_mapdata/windows-8.yaml b/test/integration/default/files/_mapdata/windows-8.yaml index cbc4dda..a33f0f5 100644 --- a/test/integration/default/files/_mapdata/windows-8.yaml +++ b/test/integration/default/files/_mapdata/windows-8.yaml @@ -50,6 +50,8 @@ values: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: "/srv/saltclass" file_roots: base: - "/srv/salt" diff --git a/test/salt/pillar/salt.sls b/test/salt/pillar/salt.sls index b469f0d..9338f52 100644 --- a/test/salt/pillar/salt.sls +++ b/test/salt/pillar/salt.sls @@ -22,6 +22,8 @@ salt: - /path/to/stack2.cfg - reclass: inventory_base_uri: /etc/reclass + - saltclass: + - path: /srv/saltclass minion: master: localhost fileserver_backend: