mac-dev-playbook/tasks/dock.yml

24 lines
600 B
YAML
Raw Normal View History

2021-04-07 17:18:39 +00:00
---
- 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-07 17:18:39 +00:00
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 }}"
2021-04-07 17:18:39 +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
loop: "{{ dockitems_persist }}"