Commit 14e9049f authored by nanahira's avatar nanahira

ntp

parent d17701bd
...@@ -83,3 +83,12 @@ dhcp-boot=tag:efi64-2-{{br.name}},netboot.xyz.efi,,{{ br.address | regex_replace ...@@ -83,3 +83,12 @@ dhcp-boot=tag:efi64-2-{{br.name}},netboot.xyz.efi,,{{ br.address | regex_replace
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% if dnsmasq.ntp is defined and dnsmasq.ntp %}
# NTP
{% if dnsmasq.ntp != "localhost" %}
dhcp-option=42,{{dnsmasq.ntp}}
{% else %}
dhcp-option=42,0.0.0.0
{% endif %}
{% endif %}
...@@ -72,6 +72,7 @@ services: ...@@ -72,6 +72,7 @@ services:
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if dnsmasq.pxe is defined and dnsmasq.pxe == "ntp" %}
ntp: ntp:
restart: always restart: always
image: cturra/ntp image: cturra/ntp
...@@ -80,4 +81,9 @@ services: ...@@ -80,4 +81,9 @@ services:
cap_add: cap_add:
- SYS_TIME - SYS_TIME
ports: ports:
- '123:123/udp' {% for br in bridges %}
{% if br.dhcp is defined and br.dhcp %}
- '{{ br.address | regex_replace("/\d+$", "") }}:123:123/udp'
{% endif %}
{% endfor %}
{% endif %}
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