mirror of
https://github.com/geerlingguy/mac-dev-playbook
synced 2025-02-16 12:38:28 +00:00
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:
parent
be8b356174
commit
4dc3e75de2
3 changed files with 29 additions and 0 deletions
|
@ -5,6 +5,8 @@ configure_dotfiles: true
|
||||||
configure_terminal: true
|
configure_terminal: true
|
||||||
configure_osx: true
|
configure_osx: true
|
||||||
|
|
||||||
|
configure_dock: []
|
||||||
|
|
||||||
configure_sudoers: false
|
configure_sudoers: false
|
||||||
sudoers_custom_config: ''
|
sudoers_custom_config: ''
|
||||||
# Example:
|
# Example:
|
||||||
|
|
4
main.yml
4
main.yml
|
@ -37,6 +37,10 @@
|
||||||
- include_tasks: tasks/extra-packages.yml
|
- include_tasks: tasks/extra-packages.yml
|
||||||
tags: ['extra-packages']
|
tags: ['extra-packages']
|
||||||
|
|
||||||
|
- include_tasks: tasks/dock.yml
|
||||||
|
when: configure_dock
|
||||||
|
tags: ['dock']
|
||||||
|
|
||||||
- name: Run configured post-provision ansible task files.
|
- name: Run configured post-provision ansible task files.
|
||||||
include_tasks: "{{ outer_item }}"
|
include_tasks: "{{ outer_item }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
|
|
23
tasks/dock.yml
Normal file
23
tasks/dock.yml
Normal 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']
|
Loading…
Add table
Reference in a new issue