---
-
  name: "Block to Allow Loading of Variables without running task"
  when: run_tasks
  block:
    -
      name: "Managing swap file entry in fstab"
      ansible.posix.mount:
        name: none
        src: "{{ swap_file_path }}"
        fstype: swap
        opts: sw
        state: "{{ swap_file_state }}"
    
    -
      name: "Including check-size.yml"
      ansible.builtin.include_tasks: check-size.yml
      when: swap_file_state == 'present'
    
    -
      name: "Including disable.yml"
      ansible.builtin.include_tasks: disable.yml
      when: swap_file_state == 'absent'
        or (swap_file_state == 'present' and swap_file_existing_size_mb != swap_file_size_mb)
    
    -
      name: "Including enable.yml"
      ansible.builtin.include_tasks: enable.yml
      when: swap_file_state == 'present'
