Files
gitlab-mirror/roles/swapfile/tasks/main.yml
2025-12-18 10:54:07 +03:00

19 lines
420 B
YAML

---
- name: "Manage swap file entry in fstab"
ansible.posix.mount:
name: none
src: "{{ swap_file_path }}"
fstype: swap
opts: sw
state: "{{ swap_file_state }}"
- name: "Include disable swap tasks"
when: swap_file_state == 'absent'
ansible.builtin.include_tasks: disable.yml
- name: "Include enable swap tasks"
when: swap_file_state == 'present'
ansible.builtin.include_tasks: enable.yml