diff --git a/roles/cluster_api/tasks/patch.yml b/roles/cluster_api/tasks/patch.yml index 7562a67..bbfa8a1 100644 --- a/roles/cluster_api/tasks/patch.yml +++ b/roles/cluster_api/tasks/patch.yml @@ -40,6 +40,7 @@ # yamllint disable rule:line-length - name: Set default values for imagePullPolicy in kubeadmConfigSpec of CRDs changed_when: false + when: cluster_api_control_plane_version >= 1.4.0 ansible.builtin.command: | kubectl patch crd {{ item.crd }} --type=json -p='[{"op": "add", "path": "{{ item.path }}", "value": "IfNotPresent"}]' loop: