diff --git a/tasks/zsh.yaml b/tasks/zsh.yaml index ed7da8a..c3c60c9 100644 --- a/tasks/zsh.yaml +++ b/tasks/zsh.yaml @@ -64,6 +64,9 @@ shell: cmd: chsh -s /bin/zsh {{ ansible_env.USER }} become: true + when: + - ansible_env.SHELL != '/bin/zsh' + - lookup('ansible.builtin.env', 'USER') tags: - zsh - terminal