diff --git a/.ansible/roles/desktop/tasks/main.yaml b/.ansible/roles/desktop/tasks/main.yaml index 20f1ec0..66902da 100644 --- a/.ansible/roles/desktop/tasks/main.yaml +++ b/.ansible/roles/desktop/tasks/main.yaml @@ -1,15 +1,8 @@ -- name: Linux desktop tasks - block: - - import_tasks: linux/software.yaml - - import_tasks: linux/config.yaml - when: ansible_system == 'Linux' - -- name: OS X desktop tasks - block: - - import_tasks: darwin/homebrew.yaml - - import_tasks: darwin/mas.yaml - - import_tasks: darwin/prefs.yaml - when: ansible_system == 'Darwin' +- name: Desktop tasks + include_tasks: "{{ loop_task }}" + loop: "{{ query('fileglob', \"{{ ansible_system|lower }}/*\") }}" + loop_control: + loop_var: loop_task - name: Common desktop tasks import_tasks: firefox.yaml