This commit is contained in:
2024-10-08 06:41:47 +02:00
parent 1ef33c16af
commit 7300938372
103 changed files with 619 additions and 198 deletions

View File

@@ -0,0 +1,14 @@
---
software_starship_mirror: "https://github.com/starship/starship/releases/download/"
software_starship_version: v1.20.1
software_starship_arch_map:
arm64: aarch64
aarch64: aarch64
software_starship_system_map:
Darwin: apple-darwin
Linux: unknown-linux-musl
software_starship_download_url: "{{ software_starship_mirror }}/{{ software_starship_version }}/starship-{{ software_starship_arch_map[ansible_architecture] }}-{{ software_starship_system_map[ansible_system] }}.tar.gz"
software_starship_download_dir: "/tmp/starship.tar.gz"
software_starship_unpack_dir: "/tmp/starship"
software_starship_unpack_file: "{{ software_starship_unpack_dir }}/starship"

View File

@@ -0,0 +1,4 @@
---
dependencies:
- role: base_info
- role: base_terminal

View File

@@ -0,0 +1,34 @@
- name: Download starship
tags: always
ansible.builtin.get_url:
mode: "0600"
url: "{{ software_starship_download_url }}"
dest: "{{ software_starship_download_dir }}"
- name: Create dir
tags: always
ansible.builtin.file:
mode: "0755"
path: "{{ software_starship_unpack_dir }}"
state: directory
- name: Extract starship
tags: always
ansible.builtin.unarchive:
src: "{{ software_starship_download_dir }}"
dest: "{{ software_starship_unpack_dir }}"
- name: Ensure dir
tags: always
ansible.builtin.file:
mode: "0755"
path: "{{ home }}/.scripts"
state: directory
- name: Move bin
tags: always
ansible.builtin.copy:
remote_src: true
mode: "0755"
src: "{{ software_starship_unpack_file }}"
dest: "{{ home }}/.local/bin/starship"