diff --git a/ansible/roles/version/tasks/main.yaml b/ansible/roles/version/tasks/main.yaml index f78d02e26..5f646bdd3 100644 --- a/ansible/roles/version/tasks/main.yaml +++ b/ansible/roles/version/tasks/main.yaml @@ -42,12 +42,15 @@ - name: copy kubeadm config template: src: "kubeadm-conf.yaml.tmpl" - dest: "kubeadm-conf.yaml" + dest: "/tmp/kubeadm-conf.yaml" - name: determine kubernetes images - shell: kubeadm config images list --config kubeadm-conf.yaml + shell: kubeadm config images list --config /tmp/kubeadm-conf.yaml register: kubernetes_kubeadm_images +- name: Cleanup kubeadm-conf + shell: rm /tmp/kubeadm-conf.yaml + - name: set kubernetes images set_fact: kubernetes_images: "{{ kubernetes_kubeadm_images.stdout_lines }}"