mirror of
https://codeberg.org/ProgramSnail/config.git
synced 2025-12-29 10:48:42 +00:00
install bun with install script
This commit is contained in:
parent
6c46903e4a
commit
78454e2000
2 changed files with 24 additions and 4 deletions
|
|
@ -1,10 +1,10 @@
|
||||||
- name: Download ghcup bootstrap script
|
- name: Downloading ghcup bootstrap script
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: https://get-ghcup.haskell.org
|
url: https://get-ghcup.haskell.org
|
||||||
return_content: true
|
return_content: true
|
||||||
register: ghcup_bootstrap
|
register: ghcup_bootstrap
|
||||||
|
|
||||||
- name: Check if .ghcup present
|
- name: Checking if .ghcup present
|
||||||
ansible.builtin.stat:
|
ansible.builtin.stat:
|
||||||
path: '{{ ansible_env.HOME }}/.ghcup'
|
path: '{{ ansible_env.HOME }}/.ghcup'
|
||||||
register: ghcup_dir
|
register: ghcup_dir
|
||||||
|
|
|
||||||
|
|
@ -13,11 +13,31 @@
|
||||||
cmd: npm install -g bun
|
cmd: npm install -g bun
|
||||||
changed_when: true # change is checked inside npm
|
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:
|
ansible.builtin.package_facts:
|
||||||
manager: auto
|
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
|
ansible.builtin.shell: fish_add_path -m {{ ansible_env.HOME }}/.bun/bin
|
||||||
args:
|
args:
|
||||||
executable: /usr/bin/fish
|
executable: /usr/bin/fish
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue