Dynamically work out which OS tasks to call
This commit is contained in:
parent
8fd3f96ced
commit
860b70aa87
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue