nmcli
Collection: community.general
Full Name: parallax.community.general.nmcli
Aliases: community.general.nmcli, nmcli
Synopsis
Manage nmcli
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| conn_name | string | yes | Name of the NetworkManager connection profile | |
| type | string | Connection type (ethernet, wifi, bond, bridge, vlan, team, etc.) | ||
| ifname | string | Interface name to bind the connection to | ||
| state | string | present | Whether the connection should be present or absent | |
| autoconnect | bool | true | Whether the connection should autoconnect | |
| dns4 | string | IPv4 DNS server addresses | ||
| ip4 | string | IPv4 address in CIDR notation | ||
| gw4 | string | IPv4 gateway address | ||
| dns6 | string | IPv6 DNS server addresses | ||
| ip6 | string | IPv6 address in CIDR notation | ||
| gw6 | string | IPv6 gateway address | ||
| method4 | string | auto | IPv4 method (auto, manual, disabled) | |
| method6 | string | auto | IPv6 method (auto, manual, disabled, ignore) | |
| mtu | int | 0 | Maximum transmission unit size | |
| zone | string | Firewall zone for the connection | ||
| master | string | Master connection name for slave connections | ||
| slave_type | string | Type of master connection (bond, bridge, team) |
Example
- name: Example nmcli task
nmcli:
conn_name: <your_conn_name>