diff --git a/dev/dock.yml b/dev/dock.yml
deleted file mode 100644
index 7d5d8a2..0000000
--- a/dev/dock.yml
+++ /dev/null
@@ -1,23 +0,0 @@
-- hosts: all
- tasks:
-
- # - name: install dockutil
- # homebrew: name=dockutil state=present
-
- - command: dockutil --list
- register: dockutil_result
- - name: remove all Dock icons
- command: dockutil --remove all
- # when: not (dockutil_result.stdout_lines | length == 1 and dockutil_result.stdout is search("^Downloads"))
- - name: add ~/Downloads to the Dock
- command: dockutil --add ~/Downloads
- --view list
- --display stack
- --sort datemodified
- when: not (dockutil_result.stdout_lines | length == 1 and dockutil_result.stdout is search("^Downloads"))
-
- - name: remove Dockutil
- homebrew: name=dockutil state=absent
-
- - name: restart Dock
- command: killall Dock
diff --git a/local/defaults.yml b/local/defaults.yml
index cb65cbc..fd084ed 100644
--- a/local/defaults.yml
+++ b/local/defaults.yml
@@ -1,4 +1,5 @@
- name: Update macOS defaults
+ tags: defaults
hosts: macos
tasks:
diff --git a/local/macos.yml b/local/macos.yml
index 16ae88e..e084933 100644
--- a/local/macos.yml
+++ b/local/macos.yml
@@ -1,4 +1,5 @@
-- name: Do macOS things
+- name: Homebrew bundle
+ tags: brew
hosts: macos
tasks:
- name: Homebrew bundle
@@ -6,27 +7,61 @@
- import_playbook: defaults.yml
-- name: Other macOS-specific things
+- name: Dock
+ tags: dock
hosts: macos
tasks:
- - name: Jujutsu things
- block:
- - name: Register Jujutsu config location
- ansible.builtin.command: jj config path --user
- register: jj_config_path_user
- changed_when: false
-
- - name: Make sure Jujutsu config dir exists
- ansible.builtin.file:
- dest: "{{ path | dirname }}"
- state: directory
- vars:
- path: "{{ jj_config_path_user.stdout }}"
-
- - name: Symlink Jujutsu config
- ansible.builtin.file:
- src: ~/.config/jj/config.toml
- dest: "{{ dest }}"
- state: link
- vars:
- dest: "{{ jj_config_path_user.stdout }}"
+ - name: Install dockutil
+ homebrew:
+ name: dockutil
+ state: present
+
+ - name: Get dock icons
+ ansible.builtin.command: dockutil --list
+ register: dockutil_result
+
+ - name: Remove all dock icons
+ ansible.builtin.command: dockutil --remove all
+
+ - name: Add ~/Downloads to the Dock
+ ansible.builtin.command: |
+ dockutil --add ~/Downloads
+ --view list
+ --display stack
+ --sort datemodified
+ when: not (dockutil_result.stdout_lines | length == 1 and dockutil_result.stdout is search("^Downloads"))
+
+ - name: Remove dockutil
+ homebrew:
+ name: dockutil
+ state: absent
+
+ - name: Restart dock
+ ansible.builtin.command: killall Dock
+
+- name: Jujutsu
+ tags: jujutsu
+ hosts: macos
+ tasks:
+ - name: Register Jujutsu config location
+ ansible.builtin.command: jj config path --user
+ register: jj_config_path_user
+ changed_when: false
+
+ - name: Make sure Jujutsu config dir exists
+ ansible.builtin.file:
+ dest: "{{ path | dirname }}"
+ state: directory
+ mode: "0700"
+ vars:
+ path: "{{ jj_config_path_user.stdout }}"
+
+ - name: Symlink Jujutsu config
+ ansible.builtin.file:
+ src: ~/.config/jj/config.toml
+ dest: "{{ dest }}"
+ state: link
+ vars:
+ dest: "{{ jj_config_path_user.stdout }}"
+
+# vim: set ft=yaml.ansible