Dynamically work out which OS tasks to call

This commit is contained in:
Scott Wallace 2019-01-20 18:16:21 +00:00
parent 8fd3f96ced
commit 860b70aa87

View file

@ -1,15 +1,8 @@
- name: Linux desktop tasks - name: Desktop tasks
block: include_tasks: "{{ loop_task }}"
- import_tasks: linux/software.yaml loop: "{{ query('fileglob', \"{{ ansible_system|lower }}/*\") }}"
- import_tasks: linux/config.yaml loop_control:
when: ansible_system == 'Linux' loop_var: loop_task
- 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: Common desktop tasks - name: Common desktop tasks
import_tasks: firefox.yaml import_tasks: firefox.yaml