From 5abdd7babcf7ec4122c4800a5a9a7187a3f930b8 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Fri, 12 Jul 2024 16:32:07 +0200 Subject: [PATCH] swap device: use shell instead of command. --- tasks/swap_device.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/swap_device.yml b/tasks/swap_device.yml index 80a7e49..872854b 100644 --- a/tasks/swap_device.yml +++ b/tasks/swap_device.yml @@ -6,12 +6,12 @@ - swap_device block: - name: swap_device | Initialize the swap device - ansible.builtin.command: mkswap {{ swap_device_name }} && touch /root/.mkswap_executed + ansible.builtin.shell: mkswap {{ swap_device_name }} && touch /root/.mkswap_executed args: creates: /root/.mkswap_executed register: mkswap_command_execution - name: swap_device | Enable the swap device - ansible.builtin.command: swapon {{ swap_device_name }} && touch /root/.swapon_executed + ansible.builtin.shell: swapon {{ swap_device_name }} && touch /root/.swapon_executed args: creates: /root/.swapon_executed