Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
nextgen-router
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
nextgen-router
Commits
71b94c9e
Commit
71b94c9e
authored
Dec 10, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update dhcpv6
parent
034e07e9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
37 deletions
+49
-37
files/bridge-post-scripts/post-up.sh.j2
files/bridge-post-scripts/post-up.sh.j2
+2
-2
files/dhcpv6/docker-compose.yml.j2
files/dhcpv6/docker-compose.yml.j2
+35
-0
files/ppp-post-scripts/postup.sh.j2
files/ppp-post-scripts/postup.sh.j2
+2
-2
files/services/docker-compose.yml.j2
files/services/docker-compose.yml.j2
+0
-33
install.yaml
install.yaml
+1
-0
network.yaml
network.yaml
+9
-0
No files found.
files/bridge-post-scripts/post-up.sh.j2
View file @
71b94c9e
...
...
@@ -46,10 +46,10 @@ iptables -t nat -A POSTROUTING -o "$BRIDGE_NAME" -j MASQUERADE
{
%
if
br.dhcpv6Client %
}
# Restart dhcpv6
cd
{{
ansible_user_dir
}}
/nextgen-router/services/
others
cd
{{
ansible_user_dir
}}
/nextgen-router/services/
dhcpv6
{
%
for
targetbr
in
bridges %
}
{
%
if
targetbr.dhcpv6Receive %
}
docker-compose
restart
dhcpv6-
{{
br.name
}}
-
{{
targetbr.name
}}
docker-compose
up
-d
--force-recreate
dhcpv6-
{{
br.name
}}
-
{{
targetbr.name
}}
{
% endif %
}
{
% endfor %
}
{
% endif %
}
...
...
files/dhcpv6/docker-compose.yml.j2
0 → 100644
View file @
71b94c9e
version: '2.4'
services:
{% for ppp in ppps %}
{% if ppp.dhcpv6Client %}
{% for br in bridges %}
{% if br.dhcpv6Receive %}
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: ppp{{ppp.id}}
LAN_INTERFACE: {{br.name}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% for srcbr in bridges %}
{% if srcbr.dhcpv6Client %}
{% for br in bridges %}
{% if br.dhcpv6Receive %}
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: {{srcbr.name}}
LAN_INTERFACE: {{br.name}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
files/ppp-post-scripts/postup.sh.j2
View file @
71b94c9e
...
...
@@ -20,10 +20,10 @@ if [[ "$?" == 0 ]]; then
ip
-6
route add default dev
"
$PPP_IFACE
"
metric
$INIT_ID
ip
-6
rule add pref 100 fwmark
$INIT_ID
lookup
$INIT_ID
cd
{{
ansible_user_dir
}}
/nextgen-router/services/
others
cd
{{
ansible_user_dir
}}
/nextgen-router/services/
dhcpv6
{
%
for
br
in
bridges %
}
{
%
if
br.dhcpv6Receive %
}
docker-compose
restart
dhcpv6-
$PPP_IFACE
-
{{
br.name
}}
docker-compose
up
-d
--force-recreate
dhcpv6-
$PPP_IFACE
-
{{
br.name
}}
{
% endif %
}
{
% endfor %
}
fi
...
...
files/services/docker-compose.yml.j2
View file @
71b94c9e
...
...
@@ -4,39 +4,6 @@ services:
restart: always
image: git-registry.mycard.moe/nanahira/docker-lldp
network_mode: host
{% for ppp in ppps %}
{% if ppp.dhcpv6Client %}
{% for br in bridges %}
{% if br.dhcpv6Receive %}
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: ppp{{ppp.id}}
LAN_INTERFACE: {{br.name}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% for srcbr in bridges %}
{% if srcbr.dhcpv6Client %}
{% for br in bridges %}
{% if br.dhcpv6Receive %}
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: {{srcbr.name}}
LAN_INTERFACE: {{br.name}}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% for instance in services.ddns %}
ddns-{{instance.name}}:
restart: always
...
...
install.yaml
View file @
71b94c9e
...
...
@@ -39,6 +39,7 @@
with_items
:
-
git-registry.mycard.moe/nanahira/docker-smartdns
-
git-registry.mycard.moe/nanahira/dnsmasq
-
git-registry.mycard.moe/nanahira/docker-dhcpv6-client
handlers
:
-
name
:
load_modules
shell
:
'
modprobe
{{item}}'
...
...
network.yaml
View file @
71b94c9e
...
...
@@ -121,6 +121,15 @@
{% for br in bridges %}
net.ipv6.conf.{{br.name}}.accept_ra = 2
{% endfor %}
-
name
:
dhcpv6 directory
file
:
name
:
'
{{ansible_user_dir}}/nextgen-router/services/dhcpv6'
state
:
directory
recurse
:
true
-
name
:
dhcpv6 docker-compose
template
:
src
:
./files/dhcpv6/docker-compose.yml.j2
dest
:
'
{{ansible_user_dir}}/nextgen-router/services/dhcpv6/docker-compose.yml'
-
name
:
dnsmasq directory
file
:
name
:
'
{{ansible_user_dir}}/nextgen-router/services/dnsmasq/{{item}}'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment