--- - name: Install shell packages apt: name: - zsh - tmux state: present - name: Set zsh as default shell for user user: name: "{{ ansible_user }}" shell: /usr/bin/zsh - name: Install Oh My Zsh for user become: true become_user: "{{ ansible_user }}" shell: sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" "" --unattended args: creates: "/home/{{ ansible_user }}/.oh-my-zsh" - name: Clone Powerlevel10k theme git: repo: https://github.com/romkatv/powerlevel10k.git dest: "/home/{{ ansible_user }}/.oh-my-zsh/custom/themes/powerlevel10k" depth: 1 update: no become: true become_user: "{{ ansible_user }}" - name: Deploy .zshrc for user copy: src: files/.zshrc dest: "/home/{{ ansible_user }}/.zshrc" owner: "{{ ansible_user }}" group: "{{ ansible_user }}" mode: '0644'