Commit f25499df authored by nanahira's avatar nanahira

optional bonds and vlans

parent 740fabe3
...@@ -17,6 +17,9 @@ iface {{link.name}} inet6 manual ...@@ -17,6 +17,9 @@ iface {{link.name}} inet6 manual
{% endfor %} {% endfor %}
# end Links
{% if bonds is defined and bonds and bonds | length > 0 %}
# Bonds # Bonds
{% for bond in bonds %} {% for bond in bonds %}
...@@ -38,6 +41,10 @@ bond-xmit-hash-policy layer2+3 ...@@ -38,6 +41,10 @@ bond-xmit-hash-policy layer2+3
{% endfor %} {% endfor %}
# end bonds
{% endif %}
{% if vlans is defined and vlans and vlans | length > 0 %}
# Vlans # Vlans
{% for vlan in vlans %} {% for vlan in vlans %}
...@@ -48,6 +55,9 @@ iface {{vlan.link}}.{{vlan.tag}} inet6 manual ...@@ -48,6 +55,9 @@ iface {{vlan.link}}.{{vlan.tag}} inet6 manual
{% endfor %} {% endfor %}
# end Vlans
{% endif %}
### end non-ubuntu ### end non-ubuntu
{% endif %} {% endif %}
...@@ -80,6 +90,8 @@ pre-down {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh ...@@ -80,6 +90,8 @@ pre-down {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh
{% endfor %} {% endfor %}
# end Bridges
# PPPs # PPPs
{% for ppp in ppps %} {% for ppp in ppps %}
...@@ -92,3 +104,5 @@ post-down {{ansible_user_dir}}/nextgen-router/scripts/ppp{{ppp.id}}/post-down.sh ...@@ -92,3 +104,5 @@ post-down {{ansible_user_dir}}/nextgen-router/scripts/ppp{{ppp.id}}/post-down.sh
provider ppp{{ppp.id}} provider ppp{{ppp.id}}
{% endfor %} {% endfor %}
# end PPPs
...@@ -7,7 +7,7 @@ network: ...@@ -7,7 +7,7 @@ network:
dhcp4: false dhcp4: false
dhcp6: false dhcp6: false
{% endfor %} {% endfor %}
{% if bonds | length > 0 %} {% if bonds is defined and bonds and bonds | length > 0 %}
bonds: bonds:
{% for bond in bonds %} {% for bond in bonds %}
'{{bond.name}}': '{{bond.name}}':
...@@ -27,7 +27,7 @@ network: ...@@ -27,7 +27,7 @@ network:
dhcp6: false dhcp6: false
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if vlans | length > 0 %} {% if vlans is defined and vlans and vlans | length > 0 %}
vlans: vlans:
{% for vlan in vlans %} {% for vlan in vlans %}
'{{vlan.link}}.{{vlan.tag}}': '{{vlan.link}}.{{vlan.tag}}':
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
with_items: with_items:
- pap - pap
- chap - chap
when: pppoeUsers is defined and pppoeUsers and pppoeUsers | length > 0
- name: pppoe post scripts - name: pppoe post scripts
become: true become: true
template: 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