1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

nmcli: add additional documentation for routing_rules4 option (#7403)

* Add additional documentation for routing_rules4 option.

I had some trouble initially getting this to work as I wasn't very clear on what was required to that end I have added an example task and fixed what I suspect is a typo in the description.

* Update nmcli.py

Remove trailing whitespace.
This commit is contained in:
Alistair MacCallum [Vaarst] 2023-10-25 07:45:45 +01:00 committed by GitHub
parent 3b87f58070
commit 09ae963f58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,7 +169,7 @@ options:
version_added: 2.0.0
routing_rules4:
description:
- Is the same as in an C(ip route add) command, except always requires specifying a priority.
- Is the same as in an C(ip rule add) command, except always requires specifying a priority.
type: list
elements: str
version_added: 3.3.0
@ -1489,6 +1489,22 @@ EXAMPLES = r'''
vlandev: eth0
vlanid: 5
state: present
## Defining ip rules while setting a static IP
## table 'production' is set with id 200 in this example.
- name: Set Static ips for interface with ip rules and routes
community.general.nmcli:
type: ethernet
conn_name: 'eth0'
ip4: '192.168.1.50'
gw4: '192.168.1.1'
state: present
routes4_extended:
- ip: "0.0.0.0/0"
next_hop: "192.168.1.1"
table: "production"
routing_rules4:
- "priority 0 from 192.168.1.50 table 200"
'''
RETURN = r"""#