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 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/integration/default/files/_mapdata/almalinux-8.yaml b/test/integration/default/files/_mapdata/almalinux-8.yaml index 956399a04..b24538b51 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 ec71e2ce5..175f20082 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 8b61ed101..798f5ffd8 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 27384e123..72ccc36dc 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 48fd71831..60fc46f75 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 5abb9551f..e3d07ce26 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 b07887c52..efce8f08f 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 073288ef8..3b6ae3067 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 b8b3ea4c6..4187c7e0a 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 e5de1bba3..cad618d20 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 138acb475..646dae794 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 67f12e727..88360b66f 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 bc68d6582..5de1282be 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 bc68d6582..5de1282be 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 4279c6cd2..56605f52f 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 b47c83a26..4d71f3bf1 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 b9dc60583..9f847a917 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 135d2775d..2efb4b03a 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 2d736835c..6ae269440 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 0e168ebc1..e017beaab 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 0b68d7c72..84cdc268f 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 743b9df5c..1bd674418 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 79255fa22..87eb4374b 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 8facd4a75..42141c6a7 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 d67bd4ea6..87d32e60b 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 b3c8e5e85..df3cc51af 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 cbc4ddac9..a33f0f5d1 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 b469f0d17..9338f5210 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: