--- - name: Prep_kubeadm_images | Check kubeadm version matches kubernetes version fail: msg: "Kubeadm version {{ kubeadm_version }} do not matches kubernetes {{ kube_version }}" when: - not skip_downloads | default(false) - not kubeadm_version == downloads.kubeadm.version - name: Prep_kubeadm_images | Download kubeadm binary include_tasks: "download_file.yml" vars: download: "{{ download_defaults | combine(downloads.kubeadm) }}" when: - not skip_downloads | default(false) - downloads.kubeadm.enabled - name: Prep_kubeadm_images | Create kubeadm config template: src: "kubeadm-images.yaml.j2" dest: "{{ kube_config_dir }}/kubeadm-images.yaml" mode: 0644 when: - not skip_kubeadm_images - name: Prep_kubeadm_images | Copy kubeadm binary from download dir to system path copy: src: "{{ downloads.kubeadm.dest }}" dest: "{{ bin_dir }}/kubeadm" mode: 0755 remote_src: true - name: Prep_kubeadm_images | Set kubeadm binary permissions file: path: "{{ bin_dir }}/kubeadm" mode: "0755" state: file - name: Prep_kubeadm_images | Generate list of required images command: "{{ bin_dir }}/kubeadm config images list --config={{ kube_config_dir }}/kubeadm-images.yaml" register: kubeadm_images_raw run_once: true changed_when: false when: - not skip_kubeadm_images