swap device: use shell instead of command.
This commit is contained in:
parent
9244f93dc3
commit
5abdd7babc
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue