From f6026af54da096f1e73db8d92216bb0db5e9174c Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Sun, 11 Oct 2020 20:34:38 +0200 Subject: [PATCH] Fix oh-my-zsh and starship - Install oh-my-zsh only if not present - Install starship as unattended Signed-off-by: Matej Focko --- playbooks/roles/shell/tasks/zsh.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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: