mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2025-02-16 12:38:28 +00:00
14 lines
405 B
YAML
14 lines
405 B
YAML
|
---
|
||
|
- name: find if dock {{ item }} exists
|
||
|
ansible.builtin.command:
|
||
|
cmd: dockutil --find '{{ item.name }}'
|
||
|
register: dockitem_exists
|
||
|
failed_when: '"No such file or directory" in dockitem_exists.stdout'
|
||
|
changed_when: false
|
||
|
tags: ['dock']
|
||
|
- name: Ensure dock {{ item }} exists
|
||
|
ansible.builtin.command:
|
||
|
cmd: dockutil --add '{{ item.path }}'
|
||
|
when: dockitem_exists.rc >0
|
||
|
tags: ['dock']
|