add swapfile role
This commit is contained in:
11
roles/swapfile/tasks/disable.yml
Normal file
11
roles/swapfile/tasks/disable.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
- name: "Disable | disable swap"
|
||||
changed_when: false
|
||||
ansible.builtin.command:
|
||||
cmd: swapoff -a
|
||||
|
||||
|
||||
- name: "Disable | ensure swap file doesn't exist"
|
||||
ansible.builtin.file:
|
||||
path: "{{ swap_file_path }}"
|
||||
state: absent
|
||||
Reference in New Issue
Block a user