[stable-2.9] Fix: nmcli bridge-slave fails with error (#74125)

This commit fixes the error for adding bridge
slaves: nmcli bridge-slave returns "Error: invalid or not allowed setting 'bridge-port'

This fix is related to #42460, #54617, and #68065

* changelog
pull/74161/head
Carlos Camacho 5 years ago committed by GitHub
parent 7b048c49a8
commit 042d8ef500
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
minor_changes:
- nmcli - fix the slaving of bridge interfaces (https://github.com/ansible/ansible/pull/74125).

@ -1103,8 +1103,9 @@ class Nmcli(object):
elif self.conn_name is not None:
cmd.append(self.conn_name)
if self.master is not None:
cmd.extend(['master', self.master])
options = {
'master': self.master,
'bridge-port.path-cost': self.path_cost,
'bridge-port.hairpin': self.bool_to_string(self.hairpin),
'bridge-port.priority': self.slavepriority,
@ -1119,8 +1120,9 @@ class Nmcli(object):
def modify_connection_bridge_slave(self):
# format for modifying bond-slave interface
cmd = [self.nmcli_bin, 'con', 'mod', self.conn_name]
if self.master is not None:
cmd.extend(['master', self.master])
options = {
'master': self.master,
'bridge-port.path-cost': self.path_cost,
'bridge-port.hairpin': self.bool_to_string(self.hairpin),
'bridge-port.priority': self.slavepriority,

Loading…
Cancel
Save