diff options
author | Georg Pfuetzenreuter | 2023-01-15 11:41:05 +0100 |
---|---|---|
committer | Georg Pfuetzenreuter | 2023-01-15 11:41:05 +0100 |
commit | 4b08299e0cf5a6b5126751d10eec8c8b2caacdab (patch) | |
tree | 91ad812c8966c51b2974489f912f741e55911894 | |
parent | 2b40942a442a0f15b2d75289d4977a114cd81e72 (diff) | |
download | salt-4b08299e0cf5a6b5126751d10eec8c8b2caacdab.tar.gz salt-4b08299e0cf5a6b5126751d10eec8c8b2caacdab.tar.bz2 salt-4b08299e0cf5a6b5126751d10eec8c8b2caacdab.zip |
Init pillar
Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
-rw-r--r-- | pillar/common.sls | 3 | ||||
-rw-r--r-- | pillar/top.sls | 13 |
2 files changed, 16 insertions, 0 deletions
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('.', '_') }} |