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"
|
2021-10-18 09:24:06 +00:00
|
|
|
|
2021-10-18 13:00:39 +00:00
|
|
|
{% for node in ['node1', 'node2', 'node3'] -%}
|
|
|
|
Create tlu harvester cluster yaml for {{ node }}:
|
2021-10-18 09:24:06 +00:00
|
|
|
file.managed:
|
2021-10-18 13:00:39 +00:00
|
|
|
- name: /srv/www/htdocs/harvester/{{ node }}.yaml
|
|
|
|
- source: salt://pxe/harvester/files/{{ node }}.yaml.jinja
|
2021-10-18 09:24:06 +00:00
|
|
|
- template: jinja
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: "0644"
|
2021-10-18 13:00:39 +00:00
|
|
|
{% endfor %}
|