Commit f7034801 authored by nanahira's avatar nanahira

optional params for services

parent 975490f2
......@@ -8,12 +8,12 @@ domain={{domain}},{{br.address}},local
{% if dnsmasq.kms is defined and dnsmasq.kms %}
### KMS
{% if dnsmasq.kms != "localhost" %}
#### Using self-hosted KMS
srv-host=_vlmcs._tcp.{{domain}},{{dnsmasq.kms}},1688,0,100
{% else %}
{% if dnsmasq.kms == "localhost" or (dnsmasq.kms.localhost is defined and dnsmasq.kms.localhost) %}
#### Using in-built KMS
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 %}
......@@ -129,12 +129,12 @@ dhcp-boot=tag:{{br.name}},{{ dnsmasq.pxe.file }},,{{ dnsmasq.pxe.address }}
{% if dnsmasq.ntp is defined and dnsmasq.ntp %}
# NTP
{% if dnsmasq.ntp != "localhost" %}
## Remote NTP server
dhcp-option=42,{{dnsmasq.ntp}}
{% else %}
{% if dnsmasq.ntp == "localhost" or (dnsmasq.ntp.localhost is defined and dnsmasq.ntp.localhost) %}
## In-built NTP server
dhcp-option=42,{{services.address}}
{% else %}
## Remote NTP server
dhcp-option=42,{{dnsmasq.ntp}}
{% endif %}
{% endif %}
......
......@@ -11,7 +11,7 @@ services:
network_mode: host
command: --remote-ip {{gdut.remote}} --keep-alive1-flag {{gdut.flag}} --enable-crypt 1
{% 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:
restart: always
image: teddysun/kms
......@@ -21,7 +21,7 @@ services:
ports:
- '{{services.address}}:1688:1688'
{% 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:
restart: always
image: git-registry.mycard.moe/nanahira/apt-cacher-ng-docker:latest
......@@ -79,12 +79,12 @@ services:
{% endif %}
{% endfor %}
{% 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:
restart: always
image: cturra/ntp
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:
- SYS_TIME
ports:
......
......@@ -90,9 +90,9 @@ vars:
dnsmasq:
extraInterfaces: [] # 额外监听的网卡
kms: localhost # kms 服务器的地址,localhost 为自己搭建
aptCacher: 10.0.0.2 # apt-cacher-ng 的地址
pxe: 10.0.0.3 # pxe 服务器的地址,localhost 为自己搭建,也可以是 address/file 对象的格式
ntp: localhost # ntp 服务器的地址,localhost 为自己搭建
aptCacher: 10.0.0.2 # apt-cacher-ng 的地址,localhost 为自己搭建,可选参数为 path upstream
pxe: 10.0.0.3 # pxe 服务器的地址,localhost 为自己搭建,也可以是 address file 的对象。
ntp: localhost # ntp 服务器的地址,localhost 为自己搭建,可选参数为 upstream
custom: |
# custom config here
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