2021-10-16 13:09:54 +00:00
|
|
|
{% for item in pillar['pxe']['harvester'] -%}
|
|
|
|
Download harvester {{ item['version'] }} ISO:
|
|
|
|
file.managed:
|
|
|
|
- name: /srv/www/htdocs/harvester/harvester-v{{ item['version'] }}-amd64.iso
|
|
|
|
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-amd64.iso
|
|
|
|
- source_hash: {{ item['hash']['iso'] }}
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|
|
|
|
|
|
|
|
Download harvester {{ item['version'] }} initrd:
|
|
|
|
file.managed:
|
|
|
|
- name: /srv/tftpboot/harvester-v{{ item['version'] }}-initrd-amd64
|
|
|
|
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-initrd-amd64
|
|
|
|
- source_hash: {{ item['hash']['initrd'] }}
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|
|
|
|
|
|
|
|
Download harvester {{ item['version'] }} wmlinuz:
|
|
|
|
file.managed:
|
|
|
|
- name: /srv/tftpboot/harvester-v{{ item['version'] }}-vmlinuz-amd64
|
|
|
|
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-vmlinuz-amd64
|
|
|
|
- source_hash: {{ item['hash']['vmlinuz'] }}
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|
|
|
|
|
|
|
|
Download harvester {{ item['version'] }} rootfs:
|
|
|
|
file.managed:
|
|
|
|
- name: /srv/www/htdocs/harvester/harvester-v{{ item['version'] }}-rootfs-amd64.squashfs
|
|
|
|
- source: https://releases.rancher.com/harvester/v{{ item['version'] }}/harvester-v{{ item['version'] }}-rootfs-amd64.squashfs
|
|
|
|
- source_hash: {{ item['hash']['rootfs'] }}
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|
|
|
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
Update harvester grub file:
|
|
|
|
file.managed:
|
|
|
|
- name: /srv/tftpboot/harvester.cfg
|
|
|
|
- source: salt://pxe/harvester/files/harvester.cfg.jinja
|
|
|
|
- template: jinja
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|