Commit f7034801 authored by nanahira's avatar nanahira

optional params for services

parent 975490f2
...@@ -8,12 +8,12 @@ domain={{domain}},{{br.address}},local ...@@ -8,12 +8,12 @@ domain={{domain}},{{br.address}},local
{% if dnsmasq.kms is defined and dnsmasq.kms %} {% if dnsmasq.kms is defined and dnsmasq.kms %}
### KMS ### KMS
{% if dnsmasq.kms != "localhost" %} {% if dnsmasq.kms == "localhost" or (dnsmasq.kms.localhost is defined and dnsmasq.kms.localhost) %}
#### Using self-hosted KMS
srv-host=_vlmcs._tcp.{{domain}},{{dnsmasq.kms}},1688,0,100
{% else %}
#### Using in-built KMS #### Using in-built KMS
srv-host=_vlmcs._tcp.{{domain}},{{services.address}},1688,0,100 srv-host=_vlmcs._tcp.{{domain}},{{services.address}},1688,0,100
{% else %}
#### Using self-hosted KMS
srv-host=_vlmcs._tcp.{{domain}},{{dnsmasq.kms}},1688,0,100
{% endif %} {% endif %}
{% endif %} {% endif %}
...@@ -129,12 +129,12 @@ dhcp-boot=tag:{{br.name}},{{ dnsmasq.pxe.file }},,{{ dnsmasq.pxe.address }} ...@@ -129,12 +129,12 @@ dhcp-boot=tag:{{br.name}},{{ dnsmasq.pxe.file }},,{{ dnsmasq.pxe.address }}
{% if dnsmasq.ntp is defined and dnsmasq.ntp %} {% if dnsmasq.ntp is defined and dnsmasq.ntp %}
# NTP # NTP
{% if dnsmasq.ntp != "localhost" %} {% if dnsmasq.ntp == "localhost" or (dnsmasq.ntp.localhost is defined and dnsmasq.ntp.localhost) %}
## Remote NTP server
dhcp-option=42,{{dnsmasq.ntp}}
{% else %}
## In-built NTP server ## In-built NTP server
dhcp-option=42,{{services.address}} dhcp-option=42,{{services.address}}
{% else %}
## Remote NTP server
dhcp-option=42,{{dnsmasq.ntp}}
{% endif %} {% endif %}
{% endif %} {% endif %}
......
...@@ -11,7 +11,7 @@ services: ...@@ -11,7 +11,7 @@ services:
network_mode: host network_mode: host
command: --remote-ip {{gdut.remote}} --keep-alive1-flag {{gdut.flag}} --enable-crypt 1 command: --remote-ip {{gdut.remote}} --keep-alive1-flag {{gdut.flag}} --enable-crypt 1
{% endif %} {% endif %}
{% if dnsmasq.kms is defined and dnsmasq.kms == "localhost" %} {% if dnsmasq.kms is defined and (dnsmasq.kms == "localhost" or (dnsmasq.kms.localhost is defined and dnsmasq.kms.localhost)) %}
kms: kms:
restart: always restart: always
image: teddysun/kms image: teddysun/kms
...@@ -21,7 +21,7 @@ services: ...@@ -21,7 +21,7 @@ services:
ports: ports:
- '{{services.address}}:1688:1688' - '{{services.address}}:1688:1688'
{% endif %} {% endif %}
{% if dnsmasq.aptCacher is defined and (dnsmasq.aptCacher == "localhost" or (dnsmasq.aptCacher.localhost is defined and dnsmasq.aptCacher.localhost) %} {% if dnsmasq.aptCacher is defined and (dnsmasq.aptCacher == "localhost" or (dnsmasq.aptCacher.localhost is defined and dnsmasq.aptCacher.localhost)) %}
apt-cacher-ng: apt-cacher-ng:
restart: always restart: always
image: git-registry.mycard.moe/nanahira/apt-cacher-ng-docker:latest image: git-registry.mycard.moe/nanahira/apt-cacher-ng-docker:latest
...@@ -79,12 +79,12 @@ services: ...@@ -79,12 +79,12 @@ services:
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if dnsmasq.ntp is defined and dnsmasq.ntp == "localhost" %} {% if dnsmasq.ntp is defined and (dnsmasq.ntp == "localhost" or (dnsmasq.ntp.localhost is defined and dnsmasq.kms.localhost)) %}
ntp: ntp:
restart: always restart: always
image: cturra/ntp image: cturra/ntp
environment: environment:
NTP_SERVERS: ntp1.aliyun.com,ntp2.aliyun.com,ntp3.aliyun.com,ntp4.aliyun.com NTP_SERVERS: {{ services.ntp.upstream | default('ntp1.aliyun.com,ntp2.aliyun.com,ntp3.aliyun.com,ntp4.aliyun.com') }}
cap_add: cap_add:
- SYS_TIME - SYS_TIME
ports: ports:
......
...@@ -90,9 +90,9 @@ vars: ...@@ -90,9 +90,9 @@ vars:
dnsmasq: dnsmasq:
extraInterfaces: [] # 额外监听的网卡 extraInterfaces: [] # 额外监听的网卡
kms: localhost # kms 服务器的地址,localhost 为自己搭建 kms: localhost # kms 服务器的地址,localhost 为自己搭建
aptCacher: 10.0.0.2 # apt-cacher-ng 的地址 aptCacher: 10.0.0.2 # apt-cacher-ng 的地址,localhost 为自己搭建,可选参数为 path upstream
pxe: 10.0.0.3 # pxe 服务器的地址,localhost 为自己搭建,也可以是 address/file 对象的格式 pxe: 10.0.0.3 # pxe 服务器的地址,localhost 为自己搭建,也可以是 address file 的对象。
ntp: localhost # ntp 服务器的地址,localhost 为自己搭建 ntp: localhost # ntp 服务器的地址,localhost 为自己搭建,可选参数为 upstream
custom: | custom: |
# custom config here # custom config here
gdut: # 校园网特化使用 gdut: # 校园网特化使用
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment