mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
[PR #7403/09ae963f backport][stable-7] nmcli: add additional documentation for routing_rules4 option (#7425)
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.
(cherry picked from commit 09ae963f58
)
Co-authored-by: Alistair MacCallum [Vaarst] <81685753+AlistairMaccallum@users.noreply.github.com>
This commit is contained in:
parent
037863b834
commit
985fbb321b
1 changed files with 17 additions and 1 deletions
|
@ -169,7 +169,7 @@ options:
|
||||||
version_added: 2.0.0
|
version_added: 2.0.0
|
||||||
routing_rules4:
|
routing_rules4:
|
||||||
description:
|
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
|
type: list
|
||||||
elements: str
|
elements: str
|
||||||
version_added: 3.3.0
|
version_added: 3.3.0
|
||||||
|
@ -1489,6 +1489,22 @@ EXAMPLES = r'''
|
||||||
vlandev: eth0
|
vlandev: eth0
|
||||||
vlanid: 5
|
vlanid: 5
|
||||||
state: present
|
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"""#
|
RETURN = r"""#
|
||||||
|
|
Loading…
Reference in a new issue