Commit e6c30a2c authored by nanahira's avatar nanahira

simplify

parent f25499df
version: '2.4'
services:
{% for ppp in ppps %}
{% if ppp.dhcpv6Client is defined and ppp.dhcpv6Client %}
{% for srcbr in bridges %}
{% if srcbr.dhcpv6Client is defined and srcbr.dhcpv6Client %}
{% for br in bridges %}
{% if br.dhcpv6Receive is defined and br.dhcpv6Receive %}
dhcpv6-ppp{{ppp.id}}-{{br.name}}:
dhcpv6-{{srcbr.name}}-{{br.name}}:
restart: always
image: git-registry.mycard.moe/nanahira/docker-dhcpv6-client
network_mode: host
cap_add:
- NET_ADMIN
environment:
WAN_INTERFACE: ppp{{ppp.id}}
WAN_INTERFACE: {{srcbr.name}}
LAN_INTERFACE: {{br.name}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% for srcbr in bridges %}
{% if srcbr.dhcpv6Client is defined and srcbr.dhcpv6Client %}
{% if ppps is defined and ppps %}
{% for ppp in ppps %}
{% if ppp.dhcpv6Client is defined and ppp.dhcpv6Client %}
{% for br in bridges %}
{% if br.dhcpv6Receive is defined and br.dhcpv6Receive %}
dhcpv6-{{srcbr.name}}-{{br.name}}:
restart: always
dhcpv6-ppp{{ppp.id}}-{{br.name}}:
image: git-registry.mycard.moe/nanahira/docker-dhcpv6-client
network_mode: host
cap_add:
- NET_ADMIN
environment:
WAN_INTERFACE: {{srcbr.name}}
WAN_INTERFACE: ppp{{ppp.id}}
LAN_INTERFACE: {{br.name}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
......@@ -24,15 +24,19 @@ force-AAAA-SOA yes
dualstack-ip-selection yes
{% endif %}
{% if ssmartdns.tls_dns is defined and smartdns.tls_dns %}
# TLS DNSes
{% for dns in smartdns.tls_dns %}
server-tls {{dns}} -group tls
{% endfor %}
{% endfor %}
{% if ssmartdns.tls_dns is defined and smartdns.tls_dns %}
# HTTPS DNSes
{% for dns in smartdns.https_dns %}
server-https {{dns}} -group tls
{% endfor %}
{% endfor %}
# China DNSes
{% for dns in smartdns.china_dns %}
......
......@@ -19,7 +19,7 @@ iface {{link.name}} inet6 manual
# end Links
{% if bonds is defined and bonds and bonds | length > 0 %}
{% if bonds is defined and bonds %}
# Bonds
{% for bond in bonds %}
......@@ -44,7 +44,7 @@ bond-xmit-hash-policy layer2+3
# end bonds
{% endif %}
{% if vlans is defined and vlans and vlans | length > 0 %}
{% if vlans is defined and vlans %}
# Vlans
{% for vlan in vlans %}
......@@ -94,6 +94,7 @@ pre-down {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh
# PPPs
{% if ppps is defined and ppps %}
{% for ppp in ppps %}
## ppp{{ppp.id}}
auto ppp{{ppp.id}}
......@@ -106,3 +107,4 @@ provider ppp{{ppp.id}}
{% endfor %}
# end PPPs
{% endif %}
......@@ -4,6 +4,7 @@ services:
restart: always
image: git-registry.mycard.moe/nanahira/docker-lldp
network_mode: host
{% if services.ddns is defined and services.ddns %}
{% for instance in services.ddns %}
ddns-{{instance.name}}:
restart: always
......@@ -24,3 +25,4 @@ services:
RRTYPE: A
{% endif %}
{% endfor %}
{% endif %}
......@@ -101,7 +101,7 @@
with_items:
- pap
- chap
when: pppoeUsers is defined and pppoeUsers and pppoeUsers | length > 0
when: pppoeUsers is defined and pppoeUsers
- name: pppoe post scripts
become: true
template:
......
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