netbird_client: deb822 netbird repository, replaces the one-line netbird.list
This commit is contained in:
@@ -5,19 +5,33 @@
|
|||||||
- curl
|
- curl
|
||||||
- gnupg
|
- gnupg
|
||||||
|
|
||||||
# Same keyring path the hand-installed hosts use, so the repository line is identical.
|
# Same keyring path the hand-installed hosts use, so the repository file is identical.
|
||||||
- name: Install the netbird repository keyring
|
- name: Install the netbird repository keyring
|
||||||
ansible.builtin.shell:
|
ansible.builtin.shell:
|
||||||
cmd: set -o pipefail && curl -fsSL https://pkgs.netbird.io/debian/public.key | gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg
|
cmd: set -o pipefail && curl -fsSL https://pkgs.netbird.io/debian/public.key | gpg --dearmor -o /usr/share/keyrings/netbird-archive-keyring.gpg
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
creates: /usr/share/keyrings/netbird-archive-keyring.gpg
|
creates: /usr/share/keyrings/netbird-archive-keyring.gpg
|
||||||
|
|
||||||
|
- name: Remove one-line netbird-repository
|
||||||
|
file:
|
||||||
|
path: /etc/apt/sources.list.d/netbird.list
|
||||||
|
state: absent
|
||||||
|
register: netbird_list
|
||||||
|
|
||||||
- name: Add netbird-repository
|
- name: Add netbird-repository
|
||||||
apt_repository:
|
deb822_repository:
|
||||||
repo: "deb [signed-by=/usr/share/keyrings/netbird-archive-keyring.gpg] https://pkgs.netbird.io/debian stable main"
|
name: netbird
|
||||||
state: present
|
types: deb
|
||||||
filename: netbird
|
uris: https://pkgs.netbird.io/debian
|
||||||
|
suites: stable
|
||||||
|
components: main
|
||||||
|
signed_by: /usr/share/keyrings/netbird-archive-keyring.gpg
|
||||||
|
register: netbird_repo
|
||||||
|
|
||||||
|
- name: Update apt cache after netbird-repository change
|
||||||
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
when: netbird_list.changed or netbird_repo.changed
|
||||||
|
|
||||||
# present, not latest: an upgrade restarts the daemon and drops the tunnels of the node.
|
# present, not latest: an upgrade restarts the daemon and drops the tunnels of the node.
|
||||||
- name: Install wireguard & netbird
|
- name: Install wireguard & netbird
|
||||||
|
|||||||
Reference in New Issue
Block a user