Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
86719ce7
Commit
86719ce7
authored
Jan 02, 2014
by
James Tanner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #5040 setup module: do not add primary interface info to the secondary interface data
parent
cb2214d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
library/system/setup
+10
-2
No files found.
library/system/setup
View file @
86719ce7
...
@@ -1540,8 +1540,7 @@ class LinuxNetwork(Network):
...
@@ -1540,8 +1540,7 @@ class LinuxNetwork(Network):
iface
=
words
[
-
1
]
iface
=
words
[
-
1
]
if
iface
!=
device
:
if
iface
!=
device
:
interfaces
[
iface
]
=
{}
interfaces
[
iface
]
=
{}
interfaces
[
iface
]
.
update
(
interfaces
[
device
])
if
not
secondary
and
"ipv4_secondaries"
not
in
interfaces
[
iface
]:
if
"ipv4_secondaries"
not
in
interfaces
[
iface
]:
interfaces
[
iface
][
"ipv4_secondaries"
]
=
[]
interfaces
[
iface
][
"ipv4_secondaries"
]
=
[]
if
not
secondary
or
"ipv4"
not
in
interfaces
[
iface
]:
if
not
secondary
or
"ipv4"
not
in
interfaces
[
iface
]:
interfaces
[
iface
][
'ipv4'
]
=
{
'address'
:
address
,
interfaces
[
iface
][
'ipv4'
]
=
{
'address'
:
address
,
...
@@ -1553,6 +1552,15 @@ class LinuxNetwork(Network):
...
@@ -1553,6 +1552,15 @@ class LinuxNetwork(Network):
'netmask'
:
netmask
,
'netmask'
:
netmask
,
'network'
:
network
,
'network'
:
network
,
})
})
# add this secondary IP to the main device
if
secondary
:
interfaces
[
device
][
"ipv4_secondaries"
]
.
append
({
'address'
:
address
,
'netmask'
:
netmask
,
'network'
:
network
,
})
# If this is the default address, update default_ipv4
# If this is the default address, update default_ipv4
if
'address'
in
default_ipv4
and
default_ipv4
[
'address'
]
==
address
:
if
'address'
in
default_ipv4
and
default_ipv4
[
'address'
]
==
address
:
default_ipv4
[
'netmask'
]
=
netmask
default_ipv4
[
'netmask'
]
=
netmask
...
...
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