mirror of
https://github.com/davestephens/ansible-nas
synced 2025-01-12 03:38:41 +00:00
Move netbootxyz to role
This commit is contained in:
parent
8b55e4aa51
commit
25f9c992fd
2 changed files with 27 additions and 6 deletions
20
roles/netbootxyz/defaults/main.yml
Normal file
20
roles/netbootxyz/defaults/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
netbootxyz_enabled: false
|
||||||
|
netbootxyz_available_externally: "false"
|
||||||
|
|
||||||
|
# directories
|
||||||
|
netbootxyz_config_directory: "{{ docker_home }}/netbootxyz/config"
|
||||||
|
netbootxyz_assets_directory: "{{ docker_home }}/netbootxyz/assets"
|
||||||
|
|
||||||
|
# network
|
||||||
|
netbootxyz_hostname: netbootxyz
|
||||||
|
netbootxyz_port_http: "3002"
|
||||||
|
netbootxyz_port_http2: "5803"
|
||||||
|
netbootxyz_port_tftp: "69"
|
||||||
|
|
||||||
|
# uid/gid
|
||||||
|
netbootxyz_user_id: "1000"
|
||||||
|
netbootxyz_group_id: "1000"
|
||||||
|
|
||||||
|
# specs
|
||||||
|
netbootxyz_memory: 1g
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
- name: netbootxyz Directory
|
- name: netbootxyz Directory
|
||||||
file:
|
file:
|
||||||
|
@ -20,14 +19,16 @@
|
||||||
- "{{ netbootxyz_port_http }}:3000"
|
- "{{ netbootxyz_port_http }}:3000"
|
||||||
- "{{ netbootxyz_port_http2 }}:80"
|
- "{{ netbootxyz_port_http2 }}:80"
|
||||||
- "{{ netbootxyz_port_tftp }}:69/udp"
|
- "{{ netbootxyz_port_tftp }}:69/udp"
|
||||||
|
memory: "{{ netbootxyz_memory }}"
|
||||||
env:
|
env:
|
||||||
TZ: "{{ ansible_nas_timezone }}"
|
TZ: "{{ ansible_nas_timezone }}"
|
||||||
PUID: "{{ netbootxyz_user_id }}"
|
PUID: "{{ netbootxyz_user_id }}"
|
||||||
PGID: "{{ netbootxyz_group_id }}"
|
PGID: "{{ netbootxyz_group_id }}"
|
||||||
restart_policy: unless-stopped
|
restart_policy: unless-stopped
|
||||||
labels:
|
labels:
|
||||||
traefik.backend: "netbootxyz"
|
traefik.enable: "{{ netbootxyz_externally }}"
|
||||||
traefik.frontend.rule: "Host:netbootxyz.{{ ansible_nas_domain }}"
|
traefik.http.routers.netdata.rule: "Host(`{{ netbootxyz_hostname }}.{{ ansible_nas_domain }}`)"
|
||||||
traefik.enable: "{{ netbootxyz_available_externally }}"
|
traefik.http.routers.netdata.tls.certresolver: "letsencrypt"
|
||||||
traefik.port: "80"
|
traefik.http.routers.netdata.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
||||||
memory: 1g
|
traefik.http.routers.netdata.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
||||||
|
traefik.http.services.netdata.loadbalancer.server.port: "80"
|
||||||
|
|
Loading…
Reference in a new issue