33 lines
948 B
YAML
33 lines
948 B
YAML
---
|
|
- name: Resolve Bun architecture
|
|
ansible.builtin.set_fact:
|
|
bun_arch: "{{ bun_arch_map[ansible_facts.architecture] }}"
|
|
|
|
- name: Create Bun installation root
|
|
ansible.builtin.file:
|
|
path: "{{ bun_install_root }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: "0755"
|
|
|
|
- name: Download Bun release archive
|
|
ansible.builtin.get_url:
|
|
url: "https://github.com/oven-sh/bun/releases/download/bun-v{{ bun_version }}/bun-linux-{{ bun_arch }}.zip"
|
|
dest: "/tmp/bun-linux-{{ bun_arch }}.zip"
|
|
mode: "0644"
|
|
|
|
- name: Unpack Bun release
|
|
ansible.builtin.unarchive:
|
|
src: "/tmp/bun-linux-{{ bun_arch }}.zip"
|
|
dest: "{{ bun_install_root }}"
|
|
remote_src: true
|
|
creates: "{{ bun_install_root }}/bun-linux-{{ bun_arch }}/bun"
|
|
|
|
- name: Symlink Bun binary into PATH
|
|
ansible.builtin.file:
|
|
src: "{{ bun_install_root }}/bun-linux-{{ bun_arch }}/bun"
|
|
dest: "{{ bun_bin_path }}"
|
|
state: link
|
|
force: true
|