--- - name: create config directory file: path: "{{ ansible_user_dir }}/.config/" state: directory - name: copy configuration copy: src: starship.toml dest: "{{ ansible_user_dir }}/.config/starship.toml" - name: Get starship install script get_url: url: https://starship.rs/install.sh dest: /tmp/starship_install.sh mode: '0755' - name: Install starship shell: cmd: /tmp/starship_install.sh --yes executable: /bin/sh become: yes - name: Update bashrc vars: bashrcpath: "{{ ansible_user_dir }}/.bashrc" blockinfile: path: "{{ bashrcpath }}" block: | eval "$(starship init bash)" state: present create: true