2021-04-11 18:44:58 +00:00
|
|
|
---
|
2021-05-07 15:26:27 +00:00
|
|
|
- name: Install dockutil.
|
2021-04-12 15:37:55 +00:00
|
|
|
homebrew:
|
|
|
|
name: dockutil
|
|
|
|
state: present
|
|
|
|
notify:
|
|
|
|
- Clear homebrew cache
|
2021-05-07 15:26:27 +00:00
|
|
|
|
|
|
|
- name: Remove configured Dock items.
|
|
|
|
ansible.builtin.include_tasks: tasks/dock-remove.yml
|
|
|
|
loop: "{{ dockitems_remove }}"
|
2021-04-11 18:44:58 +00:00
|
|
|
|
2021-04-12 15:37:55 +00:00
|
|
|
- name: Ensure required dock items exist.
|
2021-05-07 15:26:27 +00:00
|
|
|
ansible.builtin.include_tasks: tasks/dock-add.yml
|
|
|
|
loop: "{{ dockitems_persist }}"
|
2021-04-11 18:44:58 +00:00
|
|
|
|
2021-05-07 15:26:27 +00:00
|
|
|
- name: Ensure correct Dock order.
|
2021-04-12 15:37:55 +00:00
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: dockutil --move '{{ item.name }}' --position '{{ item.pos }}'
|
|
|
|
when:
|
|
|
|
- item.pos is defined
|
|
|
|
- item.pos length >0
|
2021-05-07 15:26:27 +00:00
|
|
|
loop: "{{ dockitems_persist }}"
|