From ed0e56f585037c5d8d6c6e45abf66e61b57a902f Mon Sep 17 00:00:00 2001 From: Jay Patel <78554593+jarpat@users.noreply.github.com> Date: Wed, 3 Jan 2024 14:05:10 -0500 Subject: [PATCH] fix: (IAC-1247) Add OS Guardrail to containerd.io Task (#98) --- roles/kubernetes/cri/containerd/tasks/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/kubernetes/cri/containerd/tasks/main.yaml b/roles/kubernetes/cri/containerd/tasks/main.yaml index cbe3da3..bfbb812 100644 --- a/roles/kubernetes/cri/containerd/tasks/main.yaml +++ b/roles/kubernetes/cri/containerd/tasks/main.yaml @@ -105,7 +105,9 @@ - name: Set containerd.io package debian revision if not specified set_fact: kubernetes_cri_deb_rev: "-*" - when: kubernetes_cri_version | regex_search("^(\d+\.)(\d+\.)(\d+)$") + when: + - ansible_distribution == "Ubuntu" and (ansible_distribution_version == "20.04" or ansible_distribution_version == "22.04") + - kubernetes_cri_version | regex_search("^(\d+\.)(\d+\.)(\d+)$") tags: - install - update