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
34dded36
Commit
34dded36
authored
Apr 15, 2020
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore errors on single connections
parent
88ad7886
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
18 deletions
+24
-18
ansible/configure.yaml
ansible/configure.yaml
+16
-16
ansible/protocols/wg/configure.yaml
ansible/protocols/wg/configure.yaml
+4
-1
ansible/protocols/wgfrp/configure.yaml
ansible/protocols/wgfrp/configure.yaml
+4
-1
No files found.
ansible/configure.yaml
View file @
34dded36
...
...
@@ -41,22 +41,6 @@
-
name
:
mycard ipset
shell
:
'
ipset
add
mycard
{{item}}
||
true'
with_items
:
'
{{route_lists.mycard}}'
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
-
name
:
'
clean
up
null
connections
first'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_items
:
'
{{
connections
}}'
when
:
"
item.protocol
==
'null'"
-
name
:
'
loop
through
list
from
a
variable'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_items
:
'
{{
connections
}}'
when
:
"
item.protocol
!=
'null'"
-
name
:
'
frps'
include_tasks
:
'
protocols/wgfrp/frps.yaml'
when
:
'
frps_needed
is
defined'
-
name
:
鸟配置 (Debian)
template
:
src
:
bird.conf.j2
...
...
@@ -80,6 +64,22 @@
name
:
bird
state
:
started
enabled
:
yes
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
-
name
:
'
clean
up
null
connections
first'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_items
:
'
{{
connections
}}'
when
:
"
item.protocol
==
'null'"
-
name
:
'
loop
through
list
from
a
variable'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_items
:
'
{{
connections
}}'
when
:
"
item.protocol
!=
'null'"
-
name
:
'
frps'
include_tasks
:
'
protocols/wgfrp/frps.yaml'
when
:
'
frps_needed
is
defined'
handlers
:
-
name
:
restart_bird
systemd
:
...
...
ansible/protocols/wg/configure.yaml
View file @
34dded36
...
...
@@ -20,19 +20,22 @@
name
:
'
wg-quick@{{conn.name}}'
state
:
started
enabled
:
yes
#
ignore_errors: true
ignore_errors
:
true
register
:
'
wg_enable_result'
-
name
:
'
{{conn.name}}:
restart
wg'
systemd
:
name
:
'
wg-quick@{{conn.name}}'
state
:
restarted
when
:
'
not
wg_enable_result.changed
and
wg_conf_result.changed'
ignore_errors
:
true
-
name
:
'
{{conn.name}}:
config
for
setconf'
template
:
src
:
wg-setconf.conf.j2
dest
:
'
/tmp/{{conn.name}}-setconf.conf'
register
:
'
wg_setconf_result'
ignore_errors
:
true
when
:
'
not
wg_enable_result.changed
and
not
wg_conf_result.changed'
-
name
:
'
{{conn.name}}:
wg
setconf'
ignore_errors
:
true
shell
:
'
wg
setconf
{{conn.name}}
/tmp/{{conn.name}}-setconf.conf'
when
:
'
not
wg_enable_result.changed
and
not
wg_conf_result.changed
and
wg_setconf_result.changed'
ansible/protocols/wgfrp/configure.yaml
View file @
34dded36
...
...
@@ -35,19 +35,22 @@
name
:
'
wg-quick@{{conn.name}}'
state
:
started
enabled
:
yes
#
ignore_errors: true
ignore_errors
:
true
register
:
wg_enable_result
-
name
:
'
{{conn.name}}:
restart
wg'
ignore_errors
:
true
systemd
:
name
:
'
wg-quick@{{conn.name}}'
state
:
restarted
when
:
'
not
wg_enable_result.changed
and
wg_conf_result.changed'
-
name
:
'
{{conn.name}}:
config
for
setconf'
ignore_errors
:
true
template
:
src
:
wgfrp-setconf.conf.j2
dest
:
'
/tmp/{{conn.name}}-setconf.conf'
register
:
'
wg_setconf_result'
when
:
'
not
wg_enable_result.changed
and
not
wg_conf_result.changed'
-
name
:
'
{{conn.name}}:
wg
setconf'
ignore_errors
:
true
shell
:
'
wg
setconf
{{conn.name}}
/tmp/{{conn.name}}-setconf.conf'
when
:
'
not
wg_enable_result.changed
and
not
wg_conf_result.changed
and
wg_setconf_result.changed'
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