diff --git a/default.config.yml b/default.config.yml index 394f00f..1d90117 100644 --- a/default.config.yml +++ b/default.config.yml @@ -5,29 +5,31 @@ configure_dotfiles: true configure_terminal: true configure_osx: true -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: diff --git a/main.yml b/main.yml index 75521fc..15a253c 100644 --- a/main.yml +++ b/main.yml @@ -37,7 +37,7 @@ - include_tasks: tasks/extra-packages.yml tags: ['extra-packages'] - - include_tasks: tasks/dock.yml + - import_tasks: tasks/dock.yml when: configure_dock tags: ['dock'] diff --git a/tasks/dock.yml b/tasks/dock.yml index 20cebd0..c617e46 100644 --- a/tasks/dock.yml +++ b/tasks/dock.yml @@ -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 }}"