Increase disksize;Add container image import during firstboot
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -16,3 +16,46 @@
|
||||
until: api_readycheck.apiVersion is defined
|
||||
retries: 3
|
||||
delay: 30
|
||||
|
||||
- block:
|
||||
|
||||
- name: Initialize tempfile
|
||||
ansible.builtin.tempfile:
|
||||
state: file
|
||||
register: kubeconfig
|
||||
|
||||
- name: Retrieve kubeconfig
|
||||
ansible.builtin.command:
|
||||
cmd: kubectl config view --raw
|
||||
register: kubectl_config
|
||||
|
||||
- name: Store kubeconfig in tempfile
|
||||
ansible.builtin.copy:
|
||||
dest: "{{ kubeconfig.path }}"
|
||||
content: "{{ kubectl_config.stdout }}"
|
||||
mode: 0600
|
||||
no_log: true
|
||||
|
||||
- block:
|
||||
|
||||
- name: Extract container images
|
||||
ansible.builtin.unarchive:
|
||||
src: /opt/metacluster/container_images/images-tarballs.tgz
|
||||
dest: /opt/metacluster/container_images
|
||||
list_files: yes
|
||||
register: imagetarballs
|
||||
|
||||
- ansible.builtin.debug:
|
||||
var: imagetarballs
|
||||
|
||||
- name: Import container images
|
||||
ansible.builtin.command:
|
||||
cmd: k3s ctr image import {{ item }}
|
||||
chdir: /opt/metacluster/container_images
|
||||
loop: "{{ imagetarballs.stdout_lines }}"
|
||||
|
||||
- name: Delete redundant files
|
||||
ansible.builtin.file:
|
||||
path: /opt/metacluster/container_images
|
||||
state: absent
|
||||
|
||||
|
Reference in New Issue
Block a user