added salt-cal local states and pillars

This commit is contained in:
Jonas Forsberg
2020-05-09 11:17:42 +02:00
parent 99ff02451d
commit 6ba2a64393
8 changed files with 56 additions and 0 deletions

6
salt/states/packages.sls Normal file
View File

@@ -0,0 +1,6 @@
{% for pkg in salt['pillar.get']('packages', []) %}
Install {{ pkg }}:
pkg.installed:
- name: {{ pkg }}
- refresh: false
{% endfor %}

View File

@@ -0,0 +1,10 @@
{% for repo, args in salt['pillar.get']('repositories', {}).items() %}
Add {{ repo }} repository:
pkgrepo.managed:
- name: {{ repo }}
- humanname: {{ args['humanname'] }}
- baseurl: {{ args['baseurl'] }}
- enabled: {{ args['enabled'] }}
- gpgautoimport: {{ args['gpgautoimport'] }}
- refresh: {{ args['refresh'] }}
{% endfor %}

4
salt/states/top.sls Normal file
View File

@@ -0,0 +1,4 @@
base:
'*':
- repositories
- packages