Clean up nmcli docs (#33596)

This patch cleans up the documentation for `nmcli` module.
pull/33538/merge
Major Hayden 7 years ago committed by Matt Martz
parent 425537861a
commit 666692069d

@ -423,51 +423,52 @@ EXAMPLES='''
# To add an Team connection with static IP configuration, issue a command as follows # To add an Team connection with static IP configuration, issue a command as follows
- nmcli: - nmcli:
conn_name: my-team1 conn_name: my-team1
ifname: my-team1 ifname: my-team1
type: team type: team
ip4: 192.0.2.100/24 ip4: 192.0.2.100/24
gw4: 192.0.2.1 gw4: 192.0.2.1
state: present state: present
autoconnect: yes autoconnect: yes
# Optionally, at the same time specify IPv6 addresses for the device as follows: # Optionally, at the same time specify IPv6 addresses for the device as follows:
- nmcli: - nmcli:
conn_name: my-eth1 conn_name: my-eth1
ifname: eth1 ifname: eth1
type: ethernet type: ethernet
ip4: 192.0.2.100/24 ip4: 192.0.2.100/24
gw4: 192.0.2.1 gw4: 192.0.2.1
ip6: '2001:db8::cafe' ip6: '2001:db8::cafe'
gw6: '2001:db8::1' gw6: '2001:db8::1'
state: present state: present
# To add two IPv4 DNS server addresses: # To add two IPv4 DNS server addresses:
- nmcli: - nmcli:
conn_name: my-eth1 conn_name: my-eth1
type: ethernet type: ethernet
dns4: dns4:
- 192.0.2.53 - 192.0.2.53
- 198.51.100.53 - 198.51.100.53
state: present state: present
# To make a profile usable for all compatible Ethernet interfaces, issue a command as follows # To make a profile usable for all compatible Ethernet interfaces, issue a command as follows
- nmcli: - nmcli:
ctype: ethernet ctype: ethernet
name: my-eth1 name: my-eth1
ifname: '*' ifname: '*'
state: present state: present
# To change the property of a setting e.g. MTU, issue a command as follows: # To change the property of a setting e.g. MTU, issue a command as follows:
- nmcli: - nmcli:
conn_name: my-eth1 conn_name: my-eth1
mtu: 9000 mtu: 9000
type: ethernet type: ethernet
state: present state: present
# Exit Status's: # nmcli exits with status 0 if it succeeds and exits with a status greater
# - nmcli exits with status 0 if it succeeds, a value greater than 0 is # than zero when there is a failure. The following list of status codes may be
# returned if an error occurs. # returned:
#
# - 0 Success - indicates the operation succeeded # - 0 Success - indicates the operation succeeded
# - 1 Unknown or unspecified error # - 1 Unknown or unspecified error
# - 2 Invalid user input, wrong nmcli invocation # - 2 Invalid user input, wrong nmcli invocation

Loading…
Cancel
Save