dock util from https://github.com/enlewof \n Fixed default value for variable, \ncreated block (for tags to work), \nFixed some strong language, \N fixed some shell / command preference (ansible-lint)

This commit is contained in:
dspolleke 2021-04-11 20:44:58 +02:00
parent be8b356174
commit 4dc3e75de2
3 changed files with 29 additions and 0 deletions

View file

@ -5,6 +5,8 @@ configure_dotfiles: true
configure_terminal: true
configure_osx: true
configure_dock: []
configure_sudoers: false
sudoers_custom_config: ''
# Example:

View file

@ -37,6 +37,10 @@
- include_tasks: tasks/extra-packages.yml
tags: ['extra-packages']
- include_tasks: tasks/dock.yml
when: configure_dock
tags: ['dock']
- name: Run configured post-provision ansible task files.
include_tasks: "{{ outer_item }}"
loop_control:

23
tasks/dock.yml Normal file
View file

@ -0,0 +1,23 @@
---
- name: ensure dock items
block:
- name: Install dockutil
homebrew:
name: dockutil
state: present
notify:
- Clear homebrew cache
- name: Ensure unwanted dock items removed.
command: dockutil --remove '{{ item }}'
ignore_errors: true
loop: "{{ dockitems_to_remove }}"
- name: Ensure required dock items exist.
shell: dockutil --find '{{ item.name }}' || dockutil --add '{{ item.path }}'
loop: "{{ dockitems_to_persist }}"
- name: Ensure correct dock order
command: dockutil --move '{{ item.name }}' --position '{{ item.pos }}'
loop: "{{ dockitems_to_persist }}"
tags: ['dock']