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
1bd6ce0c
Commit
1bd6ce0c
authored
Dec 25, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add preup support
parent
aa0ed1b5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
files/interfaces.j2
files/interfaces.j2
+5
-0
interface-tasks/bridge.yaml
interface-tasks/bridge.yaml
+10
-0
variables.yaml
variables.yaml
+3
-0
No files found.
files/interfaces.j2
View file @
1bd6ce0c
...
@@ -85,8 +85,13 @@ metric {{ 1100 + br.gateways[0].id }}
...
@@ -85,8 +85,13 @@ metric {{ 1100 + br.gateways[0].id }}
metric 9999
metric 9999
{% endif %}
{% endif %}
{% endif %}
{% endif %}
pre-up {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-up.sh
post-up {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/post-up.sh
post-up {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/post-up.sh
pre-down {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh
pre-down {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh
post-down {{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/post-down.sh
{% if br.mtu is defined and br.mtu %}
mtu {{br.mtu}}
{% endif %}
{% endfor %}
{% endfor %}
...
...
interface-tasks/bridge.yaml
View file @
1bd6ce0c
...
@@ -2,6 +2,11 @@
...
@@ -2,6 +2,11 @@
file
:
file
:
path
:
'
{{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}'
path
:
'
{{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}'
state
:
directory
state
:
directory
-
name
:
pre-up script
template
:
src
:
./files/bridge-post-scripts/pre-up.sh.j2
dest
:
'
{{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-up.sh'
mode
:
0755
-
name
:
post-up script
-
name
:
post-up script
template
:
template
:
src
:
./files/bridge-post-scripts/post-up.sh.j2
src
:
./files/bridge-post-scripts/post-up.sh.j2
...
@@ -12,3 +17,8 @@
...
@@ -12,3 +17,8 @@
src
:
./files/bridge-post-scripts/pre-down.sh.j2
src
:
./files/bridge-post-scripts/pre-down.sh.j2
dest
:
'
{{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh'
dest
:
'
{{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/pre-down.sh'
mode
:
0755
mode
:
0755
-
name
:
pre-down script
template
:
src
:
./files/bridge-post-scripts/post-down.sh.j2
dest
:
'
{{ansible_user_dir}}/nextgen-router/scripts/{{br.name}}/post-down.sh'
mode
:
0755
variables.yaml
View file @
1bd6ce0c
...
@@ -28,11 +28,14 @@ vars:
...
@@ -28,11 +28,14 @@ vars:
-
10.0.0.2/24
# 备选地址
-
10.0.0.2/24
# 备选地址
gateways
:
null
# 网关,看下面
gateways
:
null
# 网关,看下面
masq
:
false
# 是否MASQ
masq
:
false
# 是否MASQ
linkUp
:
echo 'link up'
# 链路启动脚本,用于奇怪的特殊链路或者netns
up
:
echo "up"
# 启动脚本和关闭脚本
up
:
echo "up"
# 启动脚本和关闭脚本
down
:
echo "down"
down
:
echo "down"
linkDown
:
echo 'link down'
mac
:
null
# 自定义mac地址,否则bridge随机,注意dhcp会以原始mac请求dhcp,因此不建议dhcp模式使用
mac
:
null
# 自定义mac地址,否则bridge随机,注意dhcp会以原始mac请求dhcp,因此不建议dhcp模式使用
dhcpv6Client
:
false
# 是否进行 dhcpv6 请求
dhcpv6Client
:
false
# 是否进行 dhcpv6 请求
dhcpv6Receive
:
true
# DHCPv6得到的地址的落脚点,只能有1个LAN获得
dhcpv6Receive
:
true
# DHCPv6得到的地址的落脚点,只能有1个LAN获得
mtu
:
1500
dhcp
:
# 是否开启dhcp,不是的话直接没有这一栏
dhcp
:
# 是否开启dhcp,不是的话直接没有这一栏
start
:
10.0.0.100
start
:
10.0.0.100
end
:
10.0.0.240
end
:
10.0.0.240
...
...
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