refactor ♻️: Refactor README and update role for Proxmox VE provisioning
This refactoring includes updating the README, changing the role name to focus on Proxmox VE, enhancing compatibility matrix, and refactoring default values for role variables. Handlers are updated to manage apt cache, restart pveproxy, and reload systemd. Role metadata is also updated for better Proxmox VE provisioning.
This commit is contained in:
23
tasks/swap.yml
Normal file
23
tasks/swap.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
- name: Set vm.swappiness
|
||||
sysctl:
|
||||
name: vm.swappiness
|
||||
value: "{{ proxmox_swapiness }}"
|
||||
state: present
|
||||
reload: yes
|
||||
|
||||
- name: Disable swap if host has enough RAM
|
||||
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:
|
||||
path: /etc/fstab
|
||||
regexp: '^\S+\s+\S+\s+swap\s+.*$'
|
||||
replace: ''
|
||||
when:
|
||||
- proxmox_disable_swap
|
||||
- ansible_memtotal_mb >= proxmox_min_ram_mb_for_no_swap
|
||||
Reference in New Issue
Block a user