Commit 68ebe783 authored by nanahira's avatar nanahira

add domain and fix kms

parent 672f512a
......@@ -16,25 +16,41 @@ no-dhcp-interface=lo{% for br in bridges %}{% if not br.dhcp is defined or not b
{% for br in bridges %}
{% if br.dhcp is defined and br.dhcp %}
# DHCP for {{br.name}}
dhcp-range={{br.name}},{{br.dhcp.start}},{{br.dhcp.end}},{{br.dhcp.time}}
{% if br.dhcpv6Receive is defined and br.dhcpv6Receive %}
dhcp-range=tag:{{br.name}},::,constructor:{{br.name}},ra-names,24h
{% if br.dhcp.domain is defined and br.dhcp.domain %}
## Domain {{br.dhcp.domain}} specified
domain={{br.dhcp.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.{{br.dhcp.domain}},{{dnsmasq.kms}},1688,0,100
{% else %}
#### Using in-built KMS
srv-host=_vlmcs._tcp.{{br.dhcp.domain}},{{services.address}},1688,0,100
{% endif %}
{% endif %}
{% endfor %}
{% else %}
## Domain not specified, using default domain {{br.name | regex_replace('^(vm)?br', '')}}.lan
domain={{br.name | regex_replace('^(vm)?br', '')}}.lan,{{br.address}},local
{% if dnsmasq.kms is defined and dnsmasq.kms %}
# KMS
### KMS
{% if dnsmasq.kms != "localhost" %}
srv-host=_vlmcs._tcp,{{dnsmasq.kms}},1688,0,100
srv-host=_vlmcs._tcp.lan,{{dnsmasq.kms}},1688,0,100
#### Using self-hosted KMS
srv-host=_vlmcs._tcp.{{br.name | regex_replace('^(vm)?br', '')}}.lan,{{dnsmasq.kms}},1688,0,100
{% else %}
srv-host=_vlmcs._tcp,{{services.address}},1688,0,100
srv-host=_vlmcs._tcp.lan,{{services.address}},1688,0,100
#### Using in-built KMS
srv-host=_vlmcs._tcp.{{br.name | regex_replace('^(vm)?br', '')}}.lan,{{services.address}},1688,0,100
{% endif %}
{% endif %}
{% endif %}
{% if br.dhcpv6Receive is defined and br.dhcpv6Receive %}
dhcp-range=tag:{{br.name}},::,constructor:{{br.name}},ra-names,24h
{% endif %}
{% endif %}
{% endfor %}
{% if dnsmasq.aptCacher is defined and dnsmasq.aptCacher %}
# apt cacher
......
......@@ -40,6 +40,7 @@ vars:
start: 10.0.0.100
end: 10.0.0.240
time: 48h
domain: lan # 该段的缺省域名,默认为 br 的名称
- name: brwan
links:
- bond0.2
......
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