mac-dev-playbook/tasks/dock.yml

24 lines
594 B
YAML
Raw Normal View History

---
- name: Install dockutil.
2021-04-12 15:37:55 +00:00
homebrew:
name: dockutil
state: present
notify:
- Clear homebrew cache
- name: Remove configured Dock items.
ansible.builtin.include_tasks: tasks/dock-remove.yml
loop: "{{ dockitems_remove }}"
2021-04-12 15:37:55 +00:00
- name: Ensure required dock items exist.
ansible.builtin.include_tasks: tasks/dock-add.yml
loop: "{{ dockitems_persist }}"
- 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 > 0
loop: "{{ dockitems_persist }}"