diff --git a/playbooks/roles/shell/tasks/zsh.yml b/playbooks/roles/shell/tasks/zsh.yml index 827b2c1..a37b47d 100644 --- a/playbooks/roles/shell/tasks/zsh.yml +++ b/playbooks/roles/shell/tasks/zsh.yml @@ -1,6 +1,12 @@ --- +- name: Check for oh-my-zsh + stat: + path: ~/.oh-my-zsh + register: ohmyzsh_directory + - name: Install oh-my-zsh shell: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended + when: not ohmyzsh_directory.stat.exists - name: Clone zsh-autosuggestions git: @@ -13,7 +19,7 @@ dest: ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting - name: Clone starship - shell: curl -fsSL https://starship.rs/install.sh | bash + shell: sh -c "$(curl -fsSL https://starship.rs/install.sh)" "" -f - name: Create zshrc template: