-
  name: "Managing progress for {{ ansible_role_name }}"
  when: count_progress | default(false)
  run_once: true
  block:
    - name: "Incrementing global progress step counter for {{ ansible_role_name }}"
      ansible.builtin.set_fact:
        global_current_progress_step: "{{ global_current_progress_step | default(0) | int + 1 }}"

    - name: "Including progress reporting task for {{ ansible_role_name }}"
      ansible.builtin.include_role:
        name: startcloud.startcloud_roles.progress
      vars:
        _progress_role_is_setup_run: false
        current_progress_step: "{{ global_current_progress_step | default(0) }}"
        progress_description: "{{ progress_role_description | default('Processing ' + ansible_role_name) }}"
-
  name: "Block to Allow Loading of Variables without running task"
  when: run_tasks
  block:
    -
      name: "Setting up Debian Installations"
      when: "ansible_os_family == 'Debian'"
      block:
        -
          name: "Gathering DEB architecture"
          ansible.builtin.command: dpkg --print-architecture
          register: deb_architecture
          changed_when: false
    
        -
          name: "Printing DEB architecture"
          ansible.builtin.debug:
            msg: "deb_architecture.stdout: {{ deb_architecture.stdout }}"
    
        -
          name: "Ensuring apt cache is updated"
          ansible.builtin.apt:
            cache_valid_time: 3600
            update_cache: true
    
        -
          name: "Upgrading all apt packages"
          ansible.builtin.apt:
            upgrade: dist
            update_cache: true
    
        -
          name: "Adding Additional Dependencies avahi-daemon"
          ansible.builtin.apt:
            name: avahi-daemon
            state: present
        
        - 
          name: "Enabling and start Avahi daemon"
          systemd:
            name: avahi-daemon
            enabled: true
            state: started
