Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tun
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
Railgun
tun
Commits
49d7ca7d
Commit
49d7ca7d
authored
Mar 30, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add refresh-localnet.yaml
parent
65041043
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
ansible/refresh-localnet.yaml
ansible/refresh-localnet.yaml
+58
-0
No files found.
ansible/refresh-localnet.yaml
0 → 100644
View file @
49d7ca7d
---
-
hosts
:
wg
tasks
:
-
name
:
load vars
include_vars
:
file
:
'
../result/{{item}}.yaml'
with_items
:
-
global-vars
-
vars-{{inventory_hostname_short}}
-
name
:
post scripts
template
:
src
:
scripts/{{item}}.sh.j2
dest
:
'
{{ansible_user_dir}}/nextgen-network/scripts/{{item}}.sh'
mode
:
a+x
with_items
:
-
postup
-
predown
-
global-postup
-
utility
-
switch-rules-up
-
switch-rules-down
-
ocserv-postup
-
ocserv-predown
notify
:
reload_switch_rules
-
name
:
ipset files
template
:
src
:
scripts/ipset.j2
dest
:
'
{{ansible_user_dir}}/nextgen-network/ipsets/{{item}}.ipset'
with_items
:
'
{{routeListNames}}'
notify
:
reload_chnroute
-
name
:
mycard ipset create
become
:
true
shell
:
'
ipset
create
mycard
hash:net
maxelem
1000000
||
true'
changed_when
:
false
-
name
:
mycard ipset
become
:
true
shell
:
'
ipset
add
mycard
{{item}}
||
true'
with_items
:
'
{{routeLists.mycard}}'
changed_when
:
false
-
name
:
localnet ipset
become
:
true
shell
:
'
ipset
add
localnet
{{item}}
||
true'
with_items
:
'
{{routeLists.mycard}}'
changed_when
:
false
-
name
:
table pref 81 lookup main
become
:
true
shell
:
'
ip
-4
rule
add
pref
81
to
{{item}}
lookup
main
||
true'
with_items
:
'
{{routeLists.mycard}}'
changed_when
:
false
handlers
:
-
name
:
reload_switch_rules
become
:
true
shell
:
'
{{ansible_user_dir}}/nextgen-network/scripts/switch-rules-down.sh
;
{{ansible_user_dir}}/nextgen-network/scripts/switch-rules-up.sh'
-
name
:
reload_chnroute
become
:
true
shell
:
|
ipset flush chnrouter
sed '/^create chnrouter hash:net family inet$/d' {{ansible_user_dir}}/nextgen-network/ipsets/chnrouter.ipset | ipset restore
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