Skip to content

Commit

Permalink
Fix: nmcli bridge-slave returns "Error: invalid or not allowed settin…
Browse files Browse the repository at this point in the history
…g 'bridge-port'

This fixes the bug: #42460
Also: #54617
  • Loading branch information
metajiji committed Mar 6, 2020
1 parent 2c0be65 commit 5684dac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ansible/modules/net_tools/nmcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1100,8 +1100,9 @@ def create_connection_bridge_slave(self):
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,
Expand All @@ -1116,8 +1117,9 @@ def create_connection_bridge_slave(self):
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,
Expand Down

0 comments on commit 5684dac

Please sign in to comment.