refactor ♻️: Refactor task names and module references for clarity and consistency
This commit refactors task names across multiple files to improve clarity and maintain consistency, ensuring that each task name accurately reflects its purpose and using the latest `ansible.builtin` modules where applicable.
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
---
|
||||
- name: Set vm.swappiness
|
||||
sysctl:
|
||||
- name: swap | Set vm.swappiness
|
||||
ansible.posix.sysctl:
|
||||
name: vm.swappiness
|
||||
value: "{{ proxmox_swapiness }}"
|
||||
state: present
|
||||
reload: yes
|
||||
|
||||
- name: Disable swap if host has enough RAM
|
||||
command: swapoff -a
|
||||
- name: swap | Disable swap if host has enough RAM
|
||||
ansible.builtin.command: swapoff -a
|
||||
when:
|
||||
- proxmox_disable_swap
|
||||
- ansible_memtotal_mb >= proxmox_min_ram_mb_for_no_swap
|
||||
changed_when: false
|
||||
|
||||
- name: Remove swap from fstab
|
||||
replace:
|
||||
- name: swap | Remove swap from fstab
|
||||
ansible.builtin.replace:
|
||||
path: /etc/fstab
|
||||
regexp: '^\S+\s+\S+\s+swap\s+.*$'
|
||||
replace: ''
|
||||
|
||||
Reference in New Issue
Block a user