From 9ddc0bdfc5caaeb267be474045e2509f71a202d1 Mon Sep 17 00:00:00 2001 From: Florian Ruynat <16313165+floryut@users.noreply.github.com> Date: Thu, 17 Sep 2020 10:57:55 +0200 Subject: [PATCH] Ignore error in check mode when disabling swap --- roles/kubernetes/preinstall/tasks/0010-swapoff.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/kubernetes/preinstall/tasks/0010-swapoff.yml b/roles/kubernetes/preinstall/tasks/0010-swapoff.yml index 99587ac03bc..73028e0f698 100644 --- a/roles/kubernetes/preinstall/tasks/0010-swapoff.yml +++ b/roles/kubernetes/preinstall/tasks/0010-swapoff.yml @@ -16,3 +16,4 @@ - name: Disable swap command: /sbin/swapoff -a when: swapon.stdout + ignore_errors: "{{ ansible_check_mode }}"