swap device: use shell instead of command.
This commit is contained in:
parent
9244f93dc3
commit
5abdd7babc
|
@ -6,12 +6,12 @@
|
||||||
- swap_device
|
- swap_device
|
||||||
block:
|
block:
|
||||||
- name: swap_device | Initialize the swap device
|
- 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:
|
args:
|
||||||
creates: /root/.mkswap_executed
|
creates: /root/.mkswap_executed
|
||||||
register: mkswap_command_execution
|
register: mkswap_command_execution
|
||||||
- name: swap_device | Enable the swap device
|
- 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:
|
args:
|
||||||
creates: /root/.swapon_executed
|
creates: /root/.swapon_executed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue