You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
809 B

- hosts: all
tasks:
# - name: install dockutil
# homebrew: name=dockutil state=present
- command: dockutil --list
register: dockutil_result
- name: remove all Dock icons
command: dockutil --remove all
# when: not (dockutil_result.stdout_lines | length == 1 and dockutil_result.stdout is search("^Downloads"))
- name: add ~/Downloads to the Dock
command: dockutil --add ~/Downloads
--view list
--display stack
--sort datemodified
when: not (dockutil_result.stdout_lines | length == 1 and dockutil_result.stdout is search("^Downloads"))
- name: remove Dockutil
homebrew: name=dockutil state=absent
- name: restart Dock
command: killall Dock