Increase disksize;Add container image import during firstboot
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2022-06-27 16:02:11 +02:00
parent 40489ff373
commit 0c01f024e9
2 changed files with 44 additions and 1 deletions

View File

@ -16,3 +16,46 @@
until: api_readycheck.apiVersion is defined until: api_readycheck.apiVersion is defined
retries: 3 retries: 3
delay: 30 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

View File

@ -41,7 +41,7 @@ source "vsphere-iso" "k8sbootstrap" {
network_card = "vmxnet3" network_card = "vmxnet3"
} }
storage { storage {
disk_size = 20480 disk_size = 51200
disk_thin_provisioned = true disk_thin_provisioned = true
} }
disk_controller_type = ["pvscsi"] disk_controller_type = ["pvscsi"]