mac-dev-playbook/tasks/dock-remove.yml

15 lines
402 B
YAML
Raw Normal View History

2021-04-12 11:29:34 +00:00
---
- name: find if dock 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'
tags: ['dock']
2021-04-12 11:49:12 +00:00
2021-04-12 11:29:34 +00:00
- name: Ensure unwanted dock items removed.
ansible.builtin.command:
cmd: dockutil --remove '{{ item }}'
when: dockitem_exists.rc == 0
tags: ['dock']