nmcli

Collection: community.general

Full Name: parallax.community.general.nmcli

Aliases: community.general.nmcli, nmcli

Synopsis

Manage nmcli

Parameters

NameTypeRequiredDefaultDescription
conn_namestringyesName of the NetworkManager connection profile
typestringConnection type (ethernet, wifi, bond, bridge, vlan, team, etc.)
ifnamestringInterface name to bind the connection to
statestringpresentWhether the connection should be present or absent
autoconnectbooltrueWhether the connection should autoconnect
dns4stringIPv4 DNS server addresses
ip4stringIPv4 address in CIDR notation
gw4stringIPv4 gateway address
dns6stringIPv6 DNS server addresses
ip6stringIPv6 address in CIDR notation
gw6stringIPv6 gateway address
method4stringautoIPv4 method (auto, manual, disabled)
method6stringautoIPv6 method (auto, manual, disabled, ignore)
mtuint0Maximum transmission unit size
zonestringFirewall zone for the connection
masterstringMaster connection name for slave connections
slave_typestringType of master connection (bond, bridge, team)

Example

- name: Example nmcli task
  nmcli:
    conn_name: <your_conn_name>