feat: properly remove swap
This commit is contained in:
parent
de4744d461
commit
891ca42a79
1 changed files with 9 additions and 1 deletions
|
|
@ -67,7 +67,7 @@
|
||||||
when: "swap_file_check.stat.exists and not __swap"
|
when: "swap_file_check.stat.exists and not __swap"
|
||||||
|
|
||||||
# configure fstab
|
# configure fstab
|
||||||
- name: "swap - configure fstab"
|
- name: "swap - configure fstab - part 1"
|
||||||
ansible.posix.mount:
|
ansible.posix.mount:
|
||||||
name: "swapfile"
|
name: "swapfile"
|
||||||
src: "{{ swap_file_location | default('/swapfile') }}"
|
src: "{{ swap_file_location | default('/swapfile') }}"
|
||||||
|
|
@ -77,3 +77,11 @@
|
||||||
dump: "0"
|
dump: "0"
|
||||||
state: "absent"
|
state: "absent"
|
||||||
when: "not __swap"
|
when: "not __swap"
|
||||||
|
|
||||||
|
# configure fstab
|
||||||
|
- name: "swap - configure fstab - part 2"
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: "/etc/fstab"
|
||||||
|
regexp: "swap"
|
||||||
|
state: "absent"
|
||||||
|
when: "not __swap"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue