From 997e6345b56a86e66cd6e169c14cbf2ab0cb7fdb Mon Sep 17 00:00:00 2001 From: Gianmarco Mameli <57061995+gianmarco-mameli@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:17:25 +0100 Subject: [PATCH] Fixes #7389 - NMCLI issue with creating a wifi bridge-slave (#7695) * working mod * added changelog fragment * added link on fragment * Update changelogs/fragments/7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml Co-authored-by: Felix Fontein * last fix --------- Co-authored-by: Felix Fontein --- .../7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml | 2 ++ plugins/modules/nmcli.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml diff --git a/changelogs/fragments/7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml b/changelogs/fragments/7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml new file mode 100644 index 0000000000..f5f07dc230 --- /dev/null +++ b/changelogs/fragments/7389-nmcli-issue-with-creating-a-wifi-bridge-slave.yml @@ -0,0 +1,2 @@ +bugfixes: + - nmcli - fix ``connection.slave-type`` wired to ``bond`` and not with parameter ``slave_type`` in case of connection type ``wifi`` (https://github.com/ansible-collections/community.general/issues/7389). \ No newline at end of file diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index af78dab40a..4ca4198e35 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -1832,7 +1832,7 @@ class Nmcli(object): elif self.type == 'wifi': options.update({ '802-11-wireless.ssid': self.ssid, - 'connection.slave-type': 'bond' if self.master else None, + 'connection.slave-type': ('bond' if self.slave_type is None else self.slave_type) if self.master else None, }) if self.wifi: for name, value in self.wifi.items():