This commit is contained in:
jonas
2021-10-18 17:20:55 +02:00
parent e3bae71113
commit be783f12ed
10 changed files with 69 additions and 0 deletions

4
salt/pillars/images.sls Normal file
View File

@@ -0,0 +1,4 @@
images:
opensuse:
- url: https://download.opensuse.org/distribution/leap/15.3/appliances/openSUSE-Leap-15.3-JeOS.x86_64-kvm-and-xen.qcow2
checksum: da11e3ed78cdadb0c8a15e9dd82c3c2b2746ba61cb98c3c03cfb156e5b8adb10

View File

@@ -11,6 +11,7 @@ base:
- hostapd
- pxe
- harvester_cluster
- images
{% if salt['pillar.file_exists']('local.sls') %}
- local
{% endif %}

View File

@@ -0,0 +1,15 @@
{% for distname, items in pillar['images'].items() %}
{% for item in items %}
{% set filename = item['url'].split('/')[-1] %}
Downloading image {{ filename }}:
file.managed:
- name: /srv/www/htdocs/images/{{ filename }}
- source: {{ item['url'] }}
- source_hash: {{ item['checksum'] }}
- user: root
- group: root
- mode: "0644"
- makedirs: True
- dir_mode: "0755"
{% endfor %}
{% endfor %}

View File

@@ -15,3 +15,4 @@ base:
- docker.registry
- remote-desktop
- wol
- images