netbird server works now. linted the yml files
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
---
|
||||
netbird_domain: netbird.tanshu.com
|
||||
netbird_mgmt_api_port: 33073
|
||||
netbird_signal_port: 10000
|
||||
netbird_coturn_port: 3478
|
||||
# Note: As of NetBird v0.62+, it includes an integrated local Identity Provider!
|
||||
# You no longer need an external IdP like Authentik, Zitadel, or Auth0 to get started.
|
||||
# You can set up your first admin account directly in the NetBird Dashboard UI.
|
||||
@@ -0,0 +1,54 @@
|
||||
---
|
||||
- name: Create Netbird docker network
|
||||
community.docker.docker_network:
|
||||
name: netbird_net
|
||||
state: present
|
||||
|
||||
- name: Create Netbird configuration directories
|
||||
ansible.builtin.file:
|
||||
path: "/var/lib/netbird/{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
loop:
|
||||
- server/etc
|
||||
- server/data
|
||||
|
||||
- name: Deploy Netbird server configuration
|
||||
ansible.builtin.template:
|
||||
src: config.yaml.j2
|
||||
dest: /var/lib/netbird/server/etc/config.yaml
|
||||
mode: "0644"
|
||||
force: false
|
||||
|
||||
- name: Start Netbird Server Container
|
||||
community.docker.docker_container:
|
||||
name: netbird-server
|
||||
image: netbirdio/netbird-server:latest
|
||||
state: started
|
||||
restart_policy: always
|
||||
network_mode: netbird_net
|
||||
ports:
|
||||
- "{{ netbird_mgmt_api_port }}:80/tcp"
|
||||
volumes:
|
||||
- "/var/lib/netbird/server/etc:/etc/netbird"
|
||||
- "/var/lib/netbird/server/data:/var/lib/netbird"
|
||||
command: "--config /etc/netbird/config.yaml"
|
||||
|
||||
- name: Start Netbird Dashboard Container
|
||||
community.docker.docker_container:
|
||||
name: netbird-dashboard
|
||||
image: netbirdio/dashboard:latest
|
||||
state: started
|
||||
restart_policy: always
|
||||
network_mode: netbird_net
|
||||
env:
|
||||
NETBIRD_MGMT_API_ENDPOINT: "https://{{ netbird_domain }}"
|
||||
NETBIRD_MGMT_GRPC_API_ENDPOINT: "https://{{ netbird_domain }}"
|
||||
AUTH_AUDIENCE: "netbird-dashboard"
|
||||
AUTH_CLIENT_ID: "netbird-dashboard"
|
||||
AUTH_CLIENT_SECRET: ""
|
||||
AUTH_AUTHORITY: "https://{{ netbird_domain }}/oauth2"
|
||||
USE_AUTH0: "false"
|
||||
AUTH_SUPPORTED_SCOPES: "openid profile email groups"
|
||||
AUTH_REDIRECT_URI: "/nb-auth"
|
||||
AUTH_SILENT_REDIRECT_URI: "/nb-silent-auth"
|
||||
@@ -0,0 +1,33 @@
|
||||
# Combined NetBird Server Configuration
|
||||
# Generated by Ansible
|
||||
|
||||
server:
|
||||
listenAddress: ":80"
|
||||
exposedAddress: "https://{{ netbird_domain }}:443"
|
||||
stunPorts:
|
||||
- 3478
|
||||
metricsPort: 9090
|
||||
healthcheckAddress: ":9000"
|
||||
logLevel: "info"
|
||||
logFile: "console"
|
||||
|
||||
authSecret: "{{ netbird_relay_secret }}"
|
||||
dataDir: "/var/lib/netbird"
|
||||
|
||||
auth:
|
||||
issuer: "https://{{ netbird_domain }}/oauth2"
|
||||
signKeyRefreshEnabled: true
|
||||
sessionCookieEncryptionKey: "{{ lookup('password', '/dev/null chars=ascii_letters,digits length=32') | b64encode }}"
|
||||
dashboardRedirectURIs:
|
||||
- "https://{{ netbird_domain }}/nb-auth"
|
||||
- "https://{{ netbird_domain }}/nb-silent-auth"
|
||||
cliRedirectURIs:
|
||||
- "http://localhost:53000/"
|
||||
|
||||
reverseProxy:
|
||||
trustedHTTPProxies:
|
||||
- "0.0.0.0/0"
|
||||
|
||||
store:
|
||||
engine: "sqlite"
|
||||
encryptionKey: "{{ netbird_datastore_enc_key }}"
|
||||
Reference in New Issue
Block a user