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
1a982dce
Commit
1a982dce
authored
Feb 04, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
system babeld
parent
5579f065
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
32 deletions
+23
-32
ansible/configure.yaml
ansible/configure.yaml
+17
-29
ansible/scripts/ocserv-postup.sh.j2
ansible/scripts/ocserv-postup.sh.j2
+1
-1
ansible/scripts/ocserv-predown.sh.j2
ansible/scripts/ocserv-predown.sh.j2
+1
-1
remove-interface.sh
remove-interface.sh
+1
-1
src/inventory.ts
src/inventory.ts
+3
-0
No files found.
ansible/configure.yaml
View file @
1a982dce
...
...
@@ -143,7 +143,7 @@
src
:
babeld.conf.j2
dest
:
'
{{ansible_user_dir}}/nextgen-network/services/babeld.conf'
#notify: restart_babeld
when
:
not noBird
when
:
not noBird
and not systemBird
-
name
:
monitor route plans
template
:
src
:
route-plans.j2
...
...
@@ -155,6 +155,7 @@
src
:
babeld-reload.conf.j2
dest
:
/tmp/babeld-reload.conf
notify
:
reload_babeld
when
:
not noBird
-
name
:
frps conf
template
:
src
:
protocols/wgfrp/frps.ini.j2
...
...
@@ -182,32 +183,25 @@
# enabled: true
# masked: false
# when: systemBird
#
- name: systemd babeld conf
#
become: true
#
template:
#
src: babeld.conf.j2
#
dest: '/etc/babeld.conf'
#
#notify: restart_babeld_systemd
# when:
systemBird
#
- name: enable systemd babeld
#
become: true
#
systemd:
#
name: babeld
#
state: started
#
enabled: true
#
masked: false
# when:
systemBird
-
name
:
systemd babeld conf
become
:
true
template
:
src
:
babeld.conf.j2
dest
:
'
/etc/babeld.conf'
#notify: restart_babeld_systemd
when
:
not noBird and
systemBird
-
name
:
enable systemd babeld
become
:
true
systemd
:
name
:
babeld
state
:
started
enabled
:
true
masked
:
false
when
:
not noBird and
systemBird
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
:
restart_babeld
# ocserv would be always restarted whenever key changes..
docker_compose
:
project_src
:
'
{{ansible_user_dir}}/nextgen-network/services'
restarted
:
true
services
:
-
babeld
when
:
not noBird
-
name
:
reload_babeld
shell
:
cat /tmp/babeld-reload.conf | timeout 1 nc ::1 33123 ||
true
-
name
:
restart_monitor
...
...
@@ -252,12 +246,6 @@
# systemd:
# name: bird
# state: restarted
#- name: restart_babeld_systemd
# become: true
# systemd:
# name: babeld
# state: restarted
# when: systemBird
-
name
:
reload_chnroute
become
:
true
shell
:
|
...
...
ansible/scripts/ocserv-postup.sh.j2
View file @
1a982dce
...
...
@@ -19,6 +19,6 @@ ip addr del "$localRubbishAddress" dev "$dev"
{{
ansible_user_dir
}}
/nextgen-network/scripts/predown.sh
{{
ansible_user_dir
}}
/nextgen-network/scripts/postup.sh
echo
-e
"flush interface
${
USERNAME
}
\n
interface
$dev
type tunnel rxcost
$metric
faraway true link-quality true
\n
quit"
| nc ::1 33123
echo
-e
"flush interface
${
USERNAME
}
\n
interface
$dev
type tunnel rxcost
$metric
faraway true link-quality true
\n
quit"
|
timeout
1
nc ::1 33123
true
ansible/scripts/ocserv-predown.sh.j2
View file @
1a982dce
...
...
@@ -3,7 +3,7 @@
export
dev
=
"
$DEVICE
"
source
/etc/ocserv/env-per-user/
$USERNAME
echo
-e
"flush interface
$dev
\n
quit"
| nc ::1 33123
echo
-e
"flush interface
$dev
\n
quit"
|
timeout
1
nc ::1 33123
{{
ansible_user_dir
}}
/nextgen-network/scripts/predown.sh
...
...
remove-interface.sh
View file @
1a982dce
...
...
@@ -4,6 +4,6 @@ COMMAND="flush interface ${INTERFACE}\nquit"
COMMAND_BASE64
=
$(
echo
-e
"
$COMMAND
"
|
base64
-w
0
)
cd
ansible
ansible wg
-m
shell
-a
"echo
$COMMAND_BASE64
| base64 --decode | nc ::1 33123"
ansible wg
-m
shell
-a
"echo
$COMMAND_BASE64
| base64 --decode |
timeout 1
nc ::1 33123"
ansible wg
-m
systemd
-b
-a
"name=wg-quick@
${
INTERFACE
}
state=stopped enabled=false"
cd
..
src/inventory.ts
View file @
1a982dce
...
...
@@ -236,6 +236,9 @@ class InventoryBuilder {
}
}
};
if
(
host
.
sysBird
)
{
delete
host
.
dockerServices
.
babeld
;
}
host
.
frpsNeeded
=
false
;
const
null_connection
=
'
10000,null
'
;
const
lanInterfaces
=
host
.
lanInterfaces
;
...
...
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