added salt-cal local states and pillars
This commit is contained in:
parent
99ff02451d
commit
6ba2a64393
@ -58,3 +58,7 @@ function ip_to_hex(){
|
||||
IFS=. read oct1 oct2 oct3 oct4 <<< "$1"
|
||||
printf '0x%02x%02x%02x%02x\n' $oct1 $oct2 $oct3 $oct4
|
||||
}
|
||||
|
||||
function salt-call(){
|
||||
sudo salt-call --local "$@"
|
||||
}
|
||||
|
10
salt/pillars/hosts/exsilio.sls
Normal file
10
salt/pillars/hosts/exsilio.sls
Normal file
@ -0,0 +1,10 @@
|
||||
packages:
|
||||
teams:
|
||||
|
||||
repositories:
|
||||
msteams:
|
||||
humanname: Microsoft Teams
|
||||
baseurl: https://packages.microsoft.com/yumrepos/ms-teams
|
||||
enabled: True
|
||||
gpgautoimport: True
|
||||
refresh: True
|
6
salt/pillars/packages.sls
Normal file
6
salt/pillars/packages.sls
Normal file
@ -0,0 +1,6 @@
|
||||
packages:
|
||||
vim:
|
||||
git:
|
||||
curl:
|
||||
htop:
|
||||
terminator:
|
9
salt/pillars/repositories.sls
Normal file
9
salt/pillars/repositories.sls
Normal file
@ -0,0 +1,9 @@
|
||||
{% if grains['lsb_distrib_id'] == "openSUSE Leap" %}
|
||||
repositories:
|
||||
packman:
|
||||
humanname: packman
|
||||
baseurl: https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Leap_{{ grains['lsb_distrib_release'] }}/
|
||||
enabled: True
|
||||
gpgautoimport: True
|
||||
refresh: True
|
||||
{% endif %}
|
7
salt/pillars/top.sls
Normal file
7
salt/pillars/top.sls
Normal file
@ -0,0 +1,7 @@
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
- repositories
|
||||
|
||||
'exsilio':
|
||||
- hosts.exsilio
|
6
salt/states/packages.sls
Normal file
6
salt/states/packages.sls
Normal file
@ -0,0 +1,6 @@
|
||||
{% for pkg in salt['pillar.get']('packages', []) %}
|
||||
Install {{ pkg }}:
|
||||
pkg.installed:
|
||||
- name: {{ pkg }}
|
||||
- refresh: false
|
||||
{% endfor %}
|
10
salt/states/repositories.sls
Normal file
10
salt/states/repositories.sls
Normal 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
4
salt/states/top.sls
Normal file
@ -0,0 +1,4 @@
|
||||
base:
|
||||
'*':
|
||||
- repositories
|
||||
- packages
|
Loading…
Reference in New Issue
Block a user