From 259b3878c1e1dbb82085bf1da2c3a4ee89d072e7 Mon Sep 17 00:00:00 2001 From: Jakub Kadlcik Date: Sun, 23 Jan 2022 23:15:49 +0100 Subject: [PATCH] swap: fix file creation to be idempotent, pt2 --- tasks/swap.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasks/swap.yml b/tasks/swap.yml index ccc09f7d0b..f4785917d8 100644 --- a/tasks/swap.yml +++ b/tasks/swap.yml @@ -3,8 +3,10 @@ # swap_file_path - name: Touch an empty file that we will use for swap - file: - path: "{{ swap_file_path }}" + copy: + content: "" + dest: "{{ swap_file_path }}" + force: no register: swap_touch - name: On BTRFS we need NoCOW