---
-
  name: "Block to Allow Loading of Variables without running task"
  when: run_tasks
  block:
  -
    name: "Checking if Genesis Apps are installed: {{ genesis_packages }}"
    register: genesis_packages_installed_check
    ansible.builtin.stat:
      path: "{{ completed_dir }}/genesis_packages_installed_check"
      get_md5: false
  
  -
    name: "Waiting for 120 seconds to let Domino fully startup from previous tasks"
    when: not genesis_packages_installed_check.stat.exists
    ansible.builtin.pause:
      seconds: 120
  
  -
    name: "Looping over Genesis packages"
    include_tasks: genesis_tasks.yml
    loop: "{{ genesis_packages }}"
    when: not genesis_packages_installed_check.stat.exists
  
  -
    name: "Debugging Genesis Application Installation"
    when: ( genesis_packages_debug or debug_all ) and not genesis_packages_installed_check.stat.exists
    ansible.builtin.debug:
      msg: "{{ domino_genesis_applications }}"
  
  -
    name: "Marking all Genesis packages as installed"
    when: not genesis_packages_installed_check.stat.exists
    ansible.builtin.file:
      mode: '0644'
      path: "{{ item }}"
      state: touch
    with_items:
      - "{{ completed_dir }}/genesis_packages_installed_check"
