From 62613427af9fa83dcda72a4306b2fbc138d1534c Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:39:28 +0100 Subject: [PATCH] [PR #7695/997e6345 backport][stable-7] Fixes #7389 - NMCLI issue with creating a wifi bridge-slave (#7911) 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 (cherry picked from commit 997e6345b56a86e66cd6e169c14cbf2ab0cb7fdb) Co-authored-by: Gianmarco Mameli <57061995+gianmarco-mameli@users.noreply.github.com> --- .../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 3882f85179..1d4edd88c6 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():