roles/netbird/tasks/main.yml: - apt balicek 'netbird' (oficialni NetBird Linux klient) - neni Docker, neni sluzba - je to VPN klient roles/netbird/defaults/main.yml: - odebrano netbird_run_as_system_service (nepotreba) - pridana poznamka o instalaci playbook priprav-novy-server.yml: - hlavicka: 'NetBird (mesh VPN klient - apt balicek, NE Docker)' group_vars/all.yml.example: - pridana dokumentace https://docs.netbird.io/get-started/install - komentare rikaji, ze to neni Docker sluzba README.md: - tabulka roli: 'apt balicek, ne Docker' - krok 8: 'NetBird (mesh VPN klient - apt balicek)' Postup instalace: - Linux server: ansible role -> apt install netbird - macOS workstation: brew install --cask netbird (v Brewfile) - Windows: instalator z netbird.io - Registrace: netbird up --setup-key <key> (z app.netbird.io)
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
---
|
|
- name: Stahnout NetBird GPG klic (oficialni repo)
|
|
ansible.builtin.get_url:
|
|
url: https://pkgs.netbird.io/deb/public.key
|
|
dest: /etc/apt/keyrings/netbird.asc
|
|
mode: "0644"
|
|
force: true
|
|
|
|
- name: Pridat NetBird APT repo
|
|
ansible.builtin.apt_repository:
|
|
repo: "deb [signed-by=/etc/apt/keyrings/netbird.asc] https://pkgs.netbird.io/deb stable main"
|
|
filename: netbird
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: Nainstalovat NetBird klienta (apt balicek)
|
|
ansible.builtin.apt:
|
|
name:
|
|
- netbird
|
|
state: present
|
|
update_cache: true
|
|
|
|
- name: Over NetBird verzi
|
|
ansible.builtin.command: netbird version
|
|
register: netbird_version_output
|
|
changed_when: false
|
|
- ansible.builtin.debug:
|
|
msg: "NetBird nainstalovan: {{ netbird_version_output.stdout }}"
|
|
|
|
- name: Registrace NetBird pomoci setup key (volitelne)
|
|
ansible.builtin.command: >
|
|
netbird up
|
|
--setup-key {{ netbird_setup_key }}
|
|
--management-url {{ netbird_management_url }}
|
|
when: netbird_setup_key | length > 0
|
|
register: netbird_up_result
|
|
changed_when: netbird_up_result.rc == 0
|
|
failed_when: false
|
|
|
|
- name: Over NetBird stav
|
|
ansible.builtin.command: netbird status
|
|
register: netbird_status_output
|
|
changed_when: false
|
|
failed_when: false
|
|
- ansible.builtin.debug:
|
|
msg: "NetBird status: {{ netbird_status_output.stdout }}"
|
|
when: netbird_setup_key | length > 0
|
|
- ansible.builtin.debug:
|
|
msg: >
|
|
NetBird nainstalovan, ale nezaregistrovany.
|
|
Pro registraci spust rucne:
|
|
sudo netbird up --setup-key <tvuj-key>
|
|
Dashboard: https://app.netbird.io/
|
|
when: netbird_setup_key | length == 0
|