diff --git a/roles/desktop-environment/tasks/utils.yml b/roles/desktop-environment/tasks/utils.yml index 761b64d..0ecd84a 100644 --- a/roles/desktop-environment/tasks/utils.yml +++ b/roles/desktop-environment/tasks/utils.yml @@ -39,8 +39,21 @@ name: zsh register: zsh_installation +- name: Download Oh My Zsh installer + ansible.builtin.get_url: + url: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh + dest: /tmp/install.sh + when: zsh_installation is changed + - name: Install Oh My Zsh ansible.builtin.command: - cmd: sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + cmd: sh /tmp/install.sh --unattended --keep-zshrc chdir: "{{ ansible_env.HOME }}" - when: zsh_installation is changed \ No newline at end of file + when: zsh_installation is changed + +- name: Delete Oh My Zsh installer + ansible.builtin.file: + path: /tmp/install.sh + state: absent + when: zsh_installation is changed +