ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
830 stars 1.53k forks source link

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

Open yan12125 opened 3 years ago

yan12125 commented 3 years ago

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

ansibullbot commented 3 years ago

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 commented 3 years ago

cc @alcamie101 @nerzhul click here for bot help

yan12125 commented 3 years ago

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.

ansibullbot commented 3 years ago

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 commented 2 years ago

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