tlu/salt/states/images/init.sls
2021-10-18 17:20:55 +02:00

16 lines
425 B
Plaintext

{% 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 %}