- name: Desktop tasks include_tasks: "{{ loop_task }}" loop: "{{ query('fileglob', \"{{ ansible_system|lower }}/*\") | sort }}" loop_control: loop_var: loop_task - name: Common desktop tasks import_tasks: firefox.yaml