mac-setup/tasks/dock.yml
2021-04-12 13:49:12 +02:00

27 lines
685 B
YAML

---
- name: ensure dock items
block:
- name: Install dockutil
homebrew:
name: dockutil
state: present
notify:
- Clear homebrew cache
- name: remove dockitems
ansible.builtin.include_tasks: tasks/remdock.yml
loop: "{{ dockitems_to_remove }}"
- name: Ensure required dock items exist.
ansible.builtin.include_tasks: tasks/adddock.yml
with_items: "{{ dockitems_to_persist }}"
- name: Ensure correct dock order
ansible.builtin.command:
cmd: dockutil --move '{{ item.name }}' --position '{{ item.pos }}'
when:
- item.pos is defined
- item.pos length >0
loop: "{{ dockitems_to_persist }}"
tags: ['dock']