diff --git a/changelogs/fragments/473-nmcli-slave-type-implemented.yml b/changelogs/fragments/473-nmcli-slave-type-implemented.yml new file mode 100644 index 0000000000..aa9dabe12e --- /dev/null +++ b/changelogs/fragments/473-nmcli-slave-type-implemented.yml @@ -0,0 +1,2 @@ +minor_changes: + - nmcli - new module option ``slave_type`` added to allow creation of various types of slave devices (https://github.com/ansible-collections/community.general/issues/473, https://github.com/ansible-collections/community.general/pull/6108). diff --git a/plugins/modules/nmcli.py b/plugins/modules/nmcli.py index 4c7920dd03..053182c2c0 100644 --- a/plugins/modules/nmcli.py +++ b/plugins/modules/nmcli.py @@ -66,6 +66,8 @@ options: - Type C(macvlan) is added in community.general 6.6.0. - Type C(wireguard) is added in community.general 4.3.0. - Type C(vpn) is added in community.general 5.1.0. + - Using C(bond-slave), C(bridge-slave) or C(team-slave) implies C(ethernet) connection type with corresponding I(slave_type) option. + - If you want to control non-ethernet connection attached to C(bond), C(bridge) or C(team) consider using C(slave_type) option. type: str choices: [ bond, bond-slave, bridge, bridge-slave, dummy, ethernet, generic, gre, infiniband, ipip, macvlan, sit, team, team-slave, vlan, vxlan, wifi, gsm, wireguard, vpn ] @@ -81,9 +83,16 @@ options: type: str choices: [ datagram, connected ] version_added: 5.8.0 + slave_type: + description: + - Type of the device of this slave's master connection (for example C(bond)). + type: str + choices: [ 'bond', 'bridge', 'team' ] + version_added: 7.0.0 master: description: - Master