mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2024-11-22 03:43:06 +00:00
16 lines
474 B
YAML
16 lines
474 B
YAML
---
|
|
- name: See if dock item {{ item }} exists.
|
|
ansible.builtin.command:
|
|
cmd: dockutil --find '{{ item }}'
|
|
register: dockitem_exists
|
|
changed_when: false
|
|
failed_when: >
|
|
"No such file or directory" in dockitem_exists.stdout
|
|
or "command not found" in dockitem_exists.stdout
|
|
tags: ['dock']
|
|
|
|
- name: Ensure Dock item {{ item }} is removed.
|
|
ansible.builtin.command:
|
|
cmd: dockutil --remove '{{ item }}'
|
|
when: dockitem_exists.rc == 0
|
|
tags: ['dock']
|