diff --git a/ansible/roles/firstboot/files/ansible_payload/playbook.yml b/ansible/roles/firstboot/files/ansible_payload/playbook.yml index 8f1d997..e7f27fa 100644 --- a/ansible/roles/firstboot/files/ansible_payload/playbook.yml +++ b/ansible/roles/firstboot/files/ansible_payload/playbook.yml @@ -7,4 +7,5 @@ - vapp - network - users + - metacluster - cleanup diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml new file mode 100644 index 0000000..54c9205 --- /dev/null +++ b/ansible/roles/firstboot/files/ansible_payload/roles/metacluster/tasks/main.yml @@ -0,0 +1,8 @@ +- name: Install K3s + ansible.builtin.command: + cmd: ./install.sh + chdir: /opt/metacluster/xxx + environment: + INSTALL_K3S_SKIP_DOWNLOAD: 'true' + INSTALL_K3S_EXEC: 'server --cluster-init' + diff --git a/ansible/roles/metacluster/tasks/components.yml b/ansible/roles/metacluster/tasks/components.yml index 3913abc..ca751ac 100644 --- a/ansible/roles/metacluster/tasks/components.yml +++ b/ansible/roles/metacluster/tasks/components.yml @@ -28,7 +28,7 @@ - name: Parse helm charts for container images ansible.builtin.command: - cmd: "{{ item.value.parse_cmd }}" /opt/metacluster/helm-charts/{{ item.key }}/values.yaml" + cmd: "{{ item.value.parse_cmd }} /opt/metacluster/helm-charts/{{ item.key }}/values.yaml" register: containerimages loop: "{{ lookup('ansible.builtin.dict', components) }}" # loop_control: @@ -42,3 +42,10 @@ # cmd: skopeo copy docker://{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }} # chdir: /opt/metacluster/container-images # loop: ... + +# - name: Compress tarballs +# community.general.archive: +# dest: /opt/metacluster/container-images/{{ item | regex_findall('[^/:]+'))[-2] }}.tar.gz +# path: /opt/metacluster/container-images/{{ item | regex_findall('[^/:]+'))[-2] }}.tar +# remove: yes +# loop: ...