diff --git a/roles/shell-tweaks/tasks/main.yml b/roles/shell-tweaks/tasks/main.yml index 1cfa572..d551479 100644 --- a/roles/shell-tweaks/tasks/main.yml +++ b/roles/shell-tweaks/tasks/main.yml @@ -4,8 +4,6 @@ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" args: creates: "{{ lookup('ansible.builtin.env', 'HOME') }}/.oh-my-zsh" -- name: Install gh CLI extensions (gh-dash) - command: gh extension install dlvhdr/gh-dash - name: Add zsh managed block blockinfile: path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.zshrc" @@ -16,6 +14,12 @@ path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.config/starship.toml" marker: "# Marc's env managed block - {mark}" block: "{{ lookup('ansible.builtin.file', 'files/starship.toml') }}" +- name: Check if gh-dash is installed + shell: gh extension list + register: gh_ext_list +- name: Install gh CLI extensions (gh-dash) + command: gh extension install dlvhdr/gh-dash + when: gh_ext_list.stdout.find('gh dash') == -1 - name: Ensure gh-dash config directory exists file: path: "{{ lookup('ansible.builtin.env', 'HOME') }}/.config/gh-dash"