From 08d04a79236568f6135d59d0a40fa2c8c5a471ab Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Sun, 28 Jan 2024 13:39:43 +0100 Subject: [PATCH] [PR #7695/997e6345 backport][stable-8] Fixes #7389 - NMCLI issue with creating a wifi bridge-slave (#7912) 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 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():