Danny Bessems
deb524d1f5
All checks were successful
continuous-integration/drone/push Build is passing
27 lines
836 B
YAML
27 lines
836 B
YAML
- name: Initialize tempfile
|
|
ansible.builtin.tempfile:
|
|
state: directory
|
|
register: kubeadm
|
|
|
|
- name: Download kubeadm binary
|
|
ansible.builtin.get_url:
|
|
url: https://dl.k8s.io/release/{{ components.clusterapi.workload.version.k8s }}/bin/linux/amd64/kubeadm
|
|
dest: "{{ kubeadm.path }}/kubeadm"
|
|
mode: u+x
|
|
|
|
- name: Retrieve container images list
|
|
ansible.builtin.shell:
|
|
cmd: "{{ kubeadm.path }}/kubeadm config images list --kubernetes-version {{ components.clusterapi.workload.version.k8s }}"
|
|
register: kubeadmimages
|
|
|
|
- name: Store list of container images for reference
|
|
ansible.builtin.copy:
|
|
dest: /opt/metacluster/cluster-api/imagelist
|
|
content: "{{ kubeadmimages.stdout }}"
|
|
|
|
- name: Cleanup tempfile
|
|
ansible.builtin.file:
|
|
path: "{{ kubeadm.path }}"
|
|
state: absent
|
|
when: kubeadm.path is defined
|