install bun with install script

This commit is contained in:
ProgramSnail 2025-08-17 13:20:55 +03:00
parent 6c46903e4a
commit 78454e2000
2 changed files with 24 additions and 4 deletions

View file

@ -1,10 +1,10 @@
- name: Download ghcup bootstrap script
- name: Downloading ghcup bootstrap script
ansible.builtin.uri:
url: https://get-ghcup.haskell.org
return_content: true
register: ghcup_bootstrap
- name: Check if .ghcup present
- name: Checking if .ghcup present
ansible.builtin.stat:
path: '{{ ansible_env.HOME }}/.ghcup'
register: ghcup_dir

View file

@ -13,11 +13,31 @@
cmd: npm install -g bun
changed_when: true # change is checked inside npm
- name: Get programs list to check fish presence
- name: Downloading bun install script
ansible.builtin.uri:
url: https://bun.sh/install
return_content: true
register: bun_bootstrap
- name: Checking if .bun present
ansible.builtin.stat:
path: '{{ ansible_env.HOME }}/.bun'
register: bun_dir
# TODO: detect fish install ??
- name: Installing bun
ansible.builtin.shell: |
{{ bun_bootstrap.content }}
args:
executable: /bin/bash
changed_when: not bun_dir.stat.exists
# update path
- name: Getting programs list to check fish presence
ansible.builtin.package_facts:
manager: auto
- name: Update fish path for bun
- name: Updating fish path for bun
ansible.builtin.shell: fish_add_path -m {{ ansible_env.HOME }}/.bun/bin
args:
executable: /usr/bin/fish