tlu/salt/states/images/init.sls

16 lines
425 B
Plaintext
Raw Normal View History

2021-10-18 15:20:55 +00:00
{% 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 %}