Packer.Images/ansible/roles/metacluster/tasks/k3s.yml
Danny Bessems 39cc83ac57
All checks were successful
continuous-integration/drone/push Build is passing
Add missing key;Add traefik ssh entrypoint
2022-07-14 10:33:26 +02:00

38 lines
1.1 KiB
YAML

- name: Create folder structure(s)
ansible.builtin.file:
path: "{{ item }}"
state: directory
loop:
- /var/lib/rancher/k3s/agent/images
- /var/lib/rancher/k3s/server/manifests
- /opt/metacluster/k3s
- name: Inject manifests
ansible.builtin.template:
src: helmchartconfig.j2
dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}_config.yml
loop: "{{ platform.packaged_components }}"
loop_control:
label: "{{ item.name }}"
- name: Download & install K3s binary
ansible.builtin.get_url:
url: https://github.com/k3s-io/k3s/releases/download/{{ platform.k3s.version }}/k3s
dest: /usr/local/bin/k3s
owner: root
group: root
mode: 0755
- name: Download K3s images tarball
ansible.builtin.get_url:
url: https://github.com/k3s-io/k3s/releases/download/{{ platform.k3s.version }}/k3s-airgap-images-amd64.tar.gz
dest: /var/lib/rancher/k3s/agent/images
- name: Download K3s install script
ansible.builtin.get_url:
url: https://get.k3s.io
dest: /opt/metacluster/k3s/install.sh
owner: root
group: root
mode: 0755