30 lines
872 B
YAML
30 lines
872 B
YAML
---
|
|
# Install Starship prompt via official install script.
|
|
# This method works on both Arch and Debian without repo differences.
|
|
|
|
- name: Check if Starship is already installed
|
|
ansible.builtin.command: starship --version
|
|
register: cli_modern_starship_check
|
|
changed_when: false
|
|
failed_when: false
|
|
|
|
- name: Download Starship install script
|
|
ansible.builtin.get_url:
|
|
url: https://starship.rs/install.sh
|
|
dest: /tmp/starship-install.sh
|
|
mode: "0755"
|
|
when: cli_modern_starship_check.rc != 0
|
|
|
|
- name: Install Starship via official installer
|
|
become: true
|
|
ansible.builtin.command: /tmp/starship-install.sh --yes
|
|
args:
|
|
creates: /usr/local/bin/starship
|
|
when: cli_modern_starship_check.rc != 0
|
|
|
|
- name: Clean up Starship installer
|
|
ansible.builtin.file:
|
|
path: /tmp/starship-install.sh
|
|
state: absent
|
|
when: cli_modern_starship_check.rc != 0
|