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
43651b8f
Commit
43651b8f
authored
Jun 30, 2022
by
nanahira
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use dict
parent
87095b4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
ansible/configure.yaml
ansible/configure.yaml
+8
-8
src/inventory.ts
src/inventory.ts
+1
-0
No files found.
ansible/configure.yaml
View file @
43651b8f
...
...
@@ -96,17 +96,17 @@
-
mci{{inventory_hostname_short}}
# 为了提高测试时候的性能,不改动wg的时候注释掉这段
-
name
:
'
clean
up
null
connections
first'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
include_tasks
:
'
protocols/{{item.
value.
protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_
items
:
'
{{
connections
}}'
when
:
"
not
noUpdateLinks
and
item.
protocol
is
defined
and
item.protocol
==
'null'
and
not
item
.noUpdate"
conn
:
'
{{item
.value
}}'
with_
dict
:
'
{{
connections
}}'
when
:
"
not
noUpdateLinks
and
item.
value.protocol
==
'null'
and
not
item.value
.noUpdate"
-
name
:
'
loop
through
list
from
a
variable'
include_tasks
:
'
protocols/{{item.protocol}}/configure.yaml'
include_tasks
:
'
protocols/{{item.
value.
protocol}}/configure.yaml'
vars
:
conn
:
'
{{item}}'
with_
items
:
'
{{
connections
}}'
when
:
"
not
noUpdateLinks
and
item.
protocol
is
defined
and
item.protocol
!=
'null'
and
not
item
.noUpdate"
conn
:
'
{{item
.value
}}'
with_
dict
:
'
{{
connectionsDict
}}'
when
:
"
not
noUpdateLinks
and
item.
value.protocol
!=
'null'
and
not
item.value
.noUpdate"
# end
-
name
:
services conf
copy
:
...
...
src/inventory.ts
View file @
43651b8f
...
...
@@ -424,6 +424,7 @@ class InventoryBuilder {
ocpasswdLines
:
host
.
ocpasswdLines
||
[],
gateways
:
_
.
values
(
this
.
gateways
[
host
.
name
]),
connections
,
connectionsDict
:
_
.
keyBy
(
connections
,
'
name
'
),
lanInterfaces
,
localSubnets
,
masqInterfaces
,
...
...
nanahira
@nanahira
mentioned in commit
1d06f09e
·
Aug 17, 2022
mentioned in commit
1d06f09e
mentioned in commit 1d06f09e7515cd9501278d07a469bd666a9129b0
Toggle commit list
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