--- - name: Ensure zsh is present apt: name: - zsh - tmux - fzf - curl - git - fasd - ripgrep state: present - name: Obtain bat .deb package get_url: url: https://github.com/sharkdp/bat/releases/download/v0.13.0/bat_0.13.0_amd64.deb dest: /tmp/bat_0.13.0_amd64.deb owner: root group: root mode: 0755 register: new_bat_deb - name: Install bat shell: dpkg -i /tmp/bat_0.13.0_amd64.deb when: new_bat_deb is defined and new_bat_deb.changed - include_tasks: antibody.yml - include_tasks: starship.yml - include_tasks: powerline.yml - name: Clone fzf repo to get completion and keybindings git: repo: 'https://github.com/junegunn/fzf' dest: /opt/fzf - name: Install zshrc template for each provided user template: src: templates/zshrc.j2 dest: "{{ item.home }}/.zshrc" owner: "{{ item.username }}" group: "{{ item.group|default(item.username) }}" mode: 0644 vars: antibody: "{{ item.antibody|default(false) }}" starship: "{{ item.starship|default(false) }}" powerline: "{{ item.powerline|default(false) }}" locale: "{{ item.locale|default('en_US.UTF-8') }}" term: "{{ item.term|default(None) }}" with_items: "{{ zsh_chic.users }}" - name: Set zsh as default shell for each provided user user: name: "{{ item.username }}" shell: /bin/zsh with_items: "{{ zsh_chic.users }}" - name: Copy starship config for use who use it copy: src: files/starship.toml dest: "{{ item.home }}/.starship.toml" owner: "{{ item.username }}" group: "{{ item.group|default(item.username) }}" mode: 0644 when: item.starship is defined and item.starship with_items: "{{ zsh_chic.users }}"