--- - name: Delete swap file ansible.builtin.include_tasks: delete.yml when: not (swap_enabled | bool) or (swap_size | int > (ansible_swaptotal_mb | int) + 1) - name: Create swap file ansible.builtin.include_tasks: create.yml when: swap_enabled | bool