Files
infra/ansible/roles/netbird_peer/tasks/main.yaml
2026-04-17 17:45:47 -06:00

35 lines
1.1 KiB
YAML

- name: Download and verify the netbird archive
get_url:
url: "https://github.com/netbirdio/netbird/releases/download/v{{ netbird_version }}/netbird_{{ netbird_version }}_linux_{{ ansible_facts['architecture'] }}.tar.gz"
dest: "/tmp/netbird-{{ netbird_version }}.linux-amd64.tar.gz"
checksum: "sha256:{{ netbird_sha256 }}"
register: download_result
- name: Unarchive netbird binary
unarchive:
src: "{{ download_result.dest }}"
dest: "/tmp/netbird_{{ netbird_version }}"
remote_src: true # Indicates the source file is on the remote host
owner: root
group: root
mode: 0755
- name: Copy netbird binary to /usr/local/bin
copy:
src: "/tmp/netbird_{{ netbird_version }}/netbird"
dest: "/usr/local/bin/netbird-{{ netbird_version }}"
owner: root
group: root
mode: '0755'
remote_src: yes
- name: Create netbird binary symlink
file:
src: "/usr/local/bin/netbird-{{ netbird_version }}"
dest: "/usr/local/bin/netbird"
state: link
owner: root
group: root
mode: '0755' # Permissions for the target file
force: yes