requested changes

This commit is contained in:
dspolleke 2021-04-12 17:37:55 +02:00 committed by Paul van Noort
parent 63659ca41e
commit 5b47a103ce
3 changed files with 42 additions and 44 deletions

View file

@ -6,29 +6,31 @@ configure_terminal: false
configure_osx: true
configure_dock: []
configure_dock: true
dockitems_to_remove:
- Launchpad
- Safari
- Messages
- Mail
- Maps
- Photos
- FaceTime
- Calendar
- Contacts
- Reminders
- Notes
- TV
- Music
- Podcasts
- 'App Store'
remove_spacers: true
configure_dock: false
dockitems_to_remove: []
# Example: to remove all / some items added by default on Big Sur uncomment use example below
# dockitems_to_remove:
# - Launchpad
# - Safari
# - Messages
# - Mail
# - Maps
# - Photos
# - FaceTime
# - Calendar
# - Contacts
# - Reminders
# - Notes
# - TV
# - Music
# - Podcasts
# - 'App Store'
dockitems_to_persist:
- name: iTerm
path: "/Applications/iTerm.app/"
- name: "Google Chrome"
path: "/Applications/Google Chrome.app/"
- name: "Sublime Text"
path: "/Applications/Sublime Text.app/"
configure_sudoers: false
sudoers_custom_config: ''
# Example:

View file

@ -48,7 +48,7 @@
executable: "{{ item.executable | default(omit) }}"
loop: "{{ gem_packages }}"
- include_tasks: tasks/dock.yml
- import_tasks: tasks/dock.yml
when: configure_dock
tags: ['dock']

View file

@ -1,26 +1,22 @@
---
- name: ensure dock items
block:
- name: Install dockutil
homebrew:
name: dockutil
state: present
notify:
- Clear homebrew cache
- name: remove dockitems
ansible.builtin.include_tasks: tasks/remdock.yml
loop: "{{ dockitems_to_remove }}"
- name: Install dockutil
homebrew:
name: dockutil
state: present
notify:
- Clear homebrew cache
- name: remove dockitems
ansible.builtin.include_tasks: tasks/remdock.yml
loop: "{{ dockitems_to_remove }}"
- name: Ensure required dock items exist.
ansible.builtin.include_tasks: tasks/adddock.yml
with_items: "{{ dockitems_to_persist }}"
- name: Ensure required dock items exist.
ansible.builtin.include_tasks: tasks/adddock.yml
with_items: "{{ dockitems_to_persist }}"
- name: Ensure correct dock order
ansible.builtin.command:
cmd: dockutil --move '{{ item.name }}' --position '{{ item.pos }}'
when:
- item.pos is defined
- item.pos length >0
loop: "{{ dockitems_to_persist }}"
tags: ['dock']
- name: Ensure correct dock order
ansible.builtin.command:
cmd: dockutil --move '{{ item.name }}' --position '{{ item.pos }}'
when:
- item.pos is defined
- item.pos length >0
loop: "{{ dockitems_to_persist }}"