summaryrefslogtreecommitdiffstats
path: root/pillar
diff options
context:
space:
mode:
Diffstat (limited to 'pillar')
-rw-r--r--pillar/common.sls3
-rw-r--r--pillar/top.sls13
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('.', '_') }}