This role automates the use of dockutil
to manage the items in your macOS Dock. You can add, remove, and arrange Dock items.
- Homebrew: Requires
homebrew
already installed (you can usegordian_jklapacz.mac.homebrew
to install it on your Mac).
Available variables are listed below, along with example values (see defaults/main.yml
):
dockitems_remove: []
Dock items to remove.
dockitems_persist: []
Dock items to add. pos
parameter is optional and will place the Dock item in a particular position in the Dock.
- (Soft dependency)
gordian_jklapacz.homebrew
- hosts: localhost
vars:
dockitems_remove:
- Launchpad
- TV
- Podcasts
- 'App Store'
dockitems_persist:
- name: Messages
path: "/Applications/Messages.app/"
- name: Safari
path: "/Applications/Safari.app/"
pos: 2
- name: Sublime Text
path: "/Applications/Sublime Text.app/"
pos: 3
roles:
- gordian_jklapacz.mac.homebrew
- gordian_jklapacz.mac.dock
See the Mac Development Ansible Playbook for an example of this role's usage.
MIT / BSD
This role was created in 2021 by Jeff Geerling, author of Ansible for DevOps.
The contents of this role were originally created by @dspolleke as part of the mac-dev-playbook
.