Init pillar

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
This commit is contained in:
Georg Pfuetzenreuter 2023-01-15 11:41:05 +01:00
parent 2b40942a44
commit 4b08299e0c
Signed by: Georg
GPG Key ID: 1ED2F138E7E6FF57
2 changed files with 16 additions and 0 deletions

3
pillar/common.sls Normal file
View File

@ -0,0 +1,3 @@
managed_header_pound: |
### This file is managed via https://git.com.de/LibertaCasa/salt
### Manual changes will be overwritten

13
pillar/top.sls Normal file
View File

@ -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('.', '_') }}