community.general icon indicating copy to clipboard operation
community.general copied to clipboard

nmcli: alow to make wifi connections as ports/links of bridges

Open yan12125 opened this issue 2 years ago • 5 comments

Summary

I'm trying to use nmcli create a bridge that connects an ethernet interface and a wifi interface. However, I cannot make the wifi connection to be a port/link of a bridge as nmcli.py hard-coded slave-type to bond [1]. It will be very helpful if it is possible to specify the slave type for wifi connections. For example, with slave-type: bridge, or another key name to avoid unwelcoming language (#2866).

If that sounds a good idea, bond-slave, team-slave and bridge-slave types [2] may be deprecated in favor of the newly added key.

[1] https://github.com/ansible-collections/community.general/blob/b2b487753264417b161f9299d7386d71a1f857cf/plugins/modules/net_tools/nmcli.py#L860 [2] https://github.com/ansible-collections/community.general/blob/b2b487753264417b161f9299d7386d71a1f857cf/plugins/modules/net_tools/nmcli.py#L57

Issue Type

Feature Idea

Component Name

nmcli

Additional Information

- name: configure Wi-Fi
  community.general.nmcli:
    conn_name: foobar
    type: wifi
    ssid: foobar
    ifname: wlp3s0
    slave-type: bridge  # Proposed idea
    state: present

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

yan12125 avatar Jul 06 '21 11:07 yan12125

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Jul 06 '21 11:07 ansibullbot

cc @alcamie101 @nerzhul click here for bot help

ansibullbot avatar Jul 06 '21 11:07 ansibullbot

Noticed a similar issue https://github.com/ansible-collections/community.general/issues/473, just with vlan instead of wifi as the type of bridge links.

yan12125 avatar Jul 15 '21 15:07 yan12125

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Sep 13 '21 19:09 ansibullbot

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

ansibullbot avatar Nov 11 '22 01:11 ansibullbot