From 4b08299e0cf5a6b5126751d10eec8c8b2caacdab Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 15 Jan 2023 11:41:05 +0100 Subject: Init pillar Signed-off-by: Georg Pfuetzenreuter --- pillar/common.sls | 3 +++ pillar/top.sls | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 pillar/common.sls create mode 100644 pillar/top.sls diff --git a/pillar/common.sls b/pillar/common.sls new file mode 100644 index 0000000..a8699b5 --- /dev/null +++ b/pillar/common.sls @@ -0,0 +1,3 @@ +managed_header_pound: | + ### This file is managed via https://git.com.de/LibertaCasa/salt + ### Manual changes will be overwritten diff --git a/pillar/top.sls b/pillar/top.sls new file mode 100644 index 0000000..36794ea --- /dev/null +++ b/pillar/top.sls @@ -0,0 +1,13 @@ +{% set roles = salt['grains.get']('roles', []) %} +{% set id = salt['grains.get']('id') %} + +{{ saltenv }}: + '*': + - common + {% for role in roles %} + 'roles:{{ role }}': + - match: grain + - role.{{ role }} + {%- endfor %} + '{{ id }}': + - id.{{ id.replace('.', '_') }} -- cgit v1.2.3