From b73ed61a47d07e541640965c28802574f28b8340 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Fri, 14 Oct 2022 19:02:22 +0200 Subject: [PATCH] Fix filter and test docs (#215) * Fix filter and test documentation syntax errors. Most cases were strings that were YAML-parsable as dictionaries due to colons, sometimes of the form `str: str`, and sometimes of the form `str: list`. Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- changelogs/fragments/217-test-filter-docs.yaml | 3 +++ docs/ansible.utils.in_any_network_test.rst | 4 ++-- docs/ansible.utils.in_network_test.rst | 4 ++-- docs/ansible.utils.in_one_network_test.rst | 4 ++-- docs/ansible.utils.index_of_filter.rst | 2 +- docs/ansible.utils.ip_address_test.rst | 2 +- docs/ansible.utils.ip_test.rst | 2 +- docs/ansible.utils.ipaddr_filter.rst | 2 +- docs/ansible.utils.ipv4_address_test.rst | 2 +- docs/ansible.utils.ipv4_hostmask_test.rst | 2 +- docs/ansible.utils.ipv4_netmask_test.rst | 2 +- docs/ansible.utils.ipv4_test.rst | 2 +- docs/ansible.utils.ipv6_address_test.rst | 2 +- docs/ansible.utils.ipv6_ipv4_mapped_test.rst | 2 +- docs/ansible.utils.ipv6_sixtofour_test.rst | 2 +- docs/ansible.utils.ipv6_teredo_test.rst | 2 +- docs/ansible.utils.ipv6_test.rst | 2 +- docs/ansible.utils.loopback_test.rst | 2 +- docs/ansible.utils.mac_test.rst | 2 +- docs/ansible.utils.multicast_test.rst | 2 +- docs/ansible.utils.private_test.rst | 2 +- docs/ansible.utils.public_test.rst | 2 +- docs/ansible.utils.reserved_test.rst | 2 +- docs/ansible.utils.resolvable_test.rst | 2 +- docs/ansible.utils.subnet_of_test.rst | 4 ++-- docs/ansible.utils.supernet_of_test.rst | 4 ++-- docs/ansible.utils.unspecified_test.rst | 2 +- docs/ansible.utils.usable_range_filter.rst | 2 +- plugins/filter/index_of.py | 2 +- plugins/filter/ipaddr.py | 9 +++++---- plugins/filter/usable_range.py | 4 +--- plugins/test/in_any_network.py | 4 ++-- plugins/test/in_network.py | 4 ++-- plugins/test/in_one_network.py | 4 ++-- plugins/test/ip.py | 5 +---- plugins/test/ip_address.py | 4 +--- plugins/test/ipv4.py | 5 +---- plugins/test/ipv4_address.py | 5 +---- plugins/test/ipv4_hostmask.py | 4 +--- plugins/test/ipv4_netmask.py | 4 +--- plugins/test/ipv6.py | 5 +---- plugins/test/ipv6_address.py | 5 +---- plugins/test/ipv6_ipv4_mapped.py | 5 +---- plugins/test/ipv6_sixtofour.py | 5 +---- plugins/test/ipv6_teredo.py | 5 +---- plugins/test/loopback.py | 4 +--- plugins/test/mac.py | 6 +----- plugins/test/multicast.py | 4 +--- plugins/test/private.py | 5 +---- plugins/test/public.py | 5 +---- plugins/test/reserved.py | 4 +--- plugins/test/resolvable.py | 5 +---- plugins/test/subnet_of.py | 6 ++---- plugins/test/supernet_of.py | 6 ++---- plugins/test/unspecified.py | 6 +----- 55 files changed, 71 insertions(+), 126 deletions(-) create mode 100644 changelogs/fragments/217-test-filter-docs.yaml diff --git a/changelogs/fragments/217-test-filter-docs.yaml b/changelogs/fragments/217-test-filter-docs.yaml new file mode 100644 index 0000000..08ef46a --- /dev/null +++ b/changelogs/fragments/217-test-filter-docs.yaml @@ -0,0 +1,3 @@ +--- +trivial: + - Fix the filter and test documentation to render well on the Ansible docsite. diff --git a/docs/ansible.utils.in_any_network_test.rst b/docs/ansible.utils.in_any_network_test.rst index fbcf884..ba5f51e 100644 --- a/docs/ansible.utils.in_any_network_test.rst +++ b/docs/ansible.utils.in_any_network_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents an IP address of a host or network
-
{'For example': '10.1.1.1'}
+
For example: 10.1.1.1
@@ -69,7 +69,7 @@ Parameters
A list of string and each string represents a network address in CIDR form
-
{'For example': ['10.0.0.0/8', '192.168.1.0/24']}
+
For example: ['10.0.0.0/8', '192.168.1.0/24']
diff --git a/docs/ansible.utils.in_network_test.rst b/docs/ansible.utils.in_network_test.rst index adf9cfa..db19b30 100644 --- a/docs/ansible.utils.in_network_test.rst +++ b/docs/ansible.utils.in_network_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents an IP address
-
{'For example': '10.1.1.1'}
+
For example: 10.1.1.1
@@ -69,7 +69,7 @@ Parameters
A string that represents the network address in CIDR form
-
{'For example': '10.0.0.0/8'}
+
For example: 10.0.0.0/8
diff --git a/docs/ansible.utils.in_one_network_test.rst b/docs/ansible.utils.in_one_network_test.rst index c697da3..1a1e802 100644 --- a/docs/ansible.utils.in_one_network_test.rst +++ b/docs/ansible.utils.in_one_network_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents an IP address
-
{'For example': '10.1.1.1'}
+
For example: 10.1.1.1
@@ -69,7 +69,7 @@ Parameters
A list of string and each string represents a network address in CIDR form
-
{'For example': ['10.0.0.0/8', '192.168.1.0/24']}
+
For example: ['10.0.0.0/8', '192.168.1.0/24']
diff --git a/docs/ansible.utils.index_of_filter.rst b/docs/ansible.utils.index_of_filter.rst index 491ebc1..d85a473 100644 --- a/docs/ansible.utils.index_of_filter.rst +++ b/docs/ansible.utils.index_of_filter.rst @@ -132,7 +132,7 @@ Parameters
The value used to test each list item against.
-
{'Not required for simple tests (eg': 'true, false, even, odd)'}
+
Not required for simple tests (eg: true, false, even, odd)
May be a string, boolean, number, regular expression dict and so on, depending on the test used
diff --git a/docs/ansible.utils.ip_address_test.rst b/docs/ansible.utils.ip_address_test.rst index 4d59e09..8d8eb64 100644 --- a/docs/ansible.utils.ip_address_test.rst +++ b/docs/ansible.utils.ip_address_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', 'hello-world']}
+
For example: 10.1.1.1 or "hello-world"
diff --git a/docs/ansible.utils.ip_test.rst b/docs/ansible.utils.ip_test.rst index f4445de..b2e2e52 100644 --- a/docs/ansible.utils.ip_test.rst +++ b/docs/ansible.utils.ip_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', '2001:db8:a::123', 'hello-world']}
+
For example: 10.1.1.1, 2001:db8:a::123, or "hello-world"
diff --git a/docs/ansible.utils.ipaddr_filter.rst b/docs/ansible.utils.ipaddr_filter.rst index 0e55624..651196a 100644 --- a/docs/ansible.utils.ipaddr_filter.rst +++ b/docs/ansible.utils.ipaddr_filter.rst @@ -69,7 +69,7 @@ Parameters
You can provide a single argument to each ipaddr() filter.
The filter will then treat it as a query and return values modified by that query.
-
{'Types of queries include': [{'query by name': "ansible.utils.ipaddr('address'), ansible.utils.ipv4('network');"}, {'query by CIDR range': "ansible.utils.ipaddr('192.168.0.0/24'), ansible.utils.ipv6('2001:db8::/32');"}, {'query by index number': "ansible.utils.ipaddr('1'), ansible.utils.ipaddr('-1');"}]}
+
Types of queries include: 1. query by name: ansible.utils.ipaddr('address'), ansible.utils.ipv4('network'); 2. query by CIDR range: ansible.utils.ipaddr('192.168.0.0/24'), ansible.utils.ipv6('2001:db8::/32'); 3. query by index number: ansible.utils.ipaddr('1'), ansible.utils.ipaddr('-1');
diff --git a/docs/ansible.utils.ipv4_address_test.rst b/docs/ansible.utils.ipv4_address_test.rst index 357520a..3370c39 100644 --- a/docs/ansible.utils.ipv4_address_test.rst +++ b/docs/ansible.utils.ipv4_address_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', '10.0.0.0/8', 'fe80::216:3eff:fee4:16f3']}
+
For example: 10.1.1.1, 10.0.0.0/8, or fe80::216:3eff:fee4:16f3
diff --git a/docs/ansible.utils.ipv4_hostmask_test.rst b/docs/ansible.utils.ipv4_hostmask_test.rst index 2df2a4d..271e667 100644 --- a/docs/ansible.utils.ipv4_hostmask_test.rst +++ b/docs/ansible.utils.ipv4_hostmask_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['0.1.255.255', '255.255.255.0']}
+
For example: 0.1.255.255 or 255.255.255.0
diff --git a/docs/ansible.utils.ipv4_netmask_test.rst b/docs/ansible.utils.ipv4_netmask_test.rst index 8ca045f..dbed4ce 100644 --- a/docs/ansible.utils.ipv4_netmask_test.rst +++ b/docs/ansible.utils.ipv4_netmask_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['0.1.255.255', '255.255.255.0']}
+
For example: 0.1.255.255 or 255.255.255.0
diff --git a/docs/ansible.utils.ipv4_test.rst b/docs/ansible.utils.ipv4_test.rst index f3f87ef..51320ef 100644 --- a/docs/ansible.utils.ipv4_test.rst +++ b/docs/ansible.utils.ipv4_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', '10.0.0.0/8', 'fe80::216:3eff:fee4:16f3']}
+
For example: 10.1.1.1, 10.0.0.0/8, or fe80::216:3eff:fee4:16f3
diff --git a/docs/ansible.utils.ipv6_address_test.rst b/docs/ansible.utils.ipv6_address_test.rst index 9915bf7..81c4438 100644 --- a/docs/ansible.utils.ipv6_address_test.rst +++ b/docs/ansible.utils.ipv6_address_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', '10.0.0.0/8', 'fe80::216:3eff:fee4:16f3']}
+
For example: 10.1.1.1, 10.0.0.0/8, or fe80::216:3eff:fee4:16f3
diff --git a/docs/ansible.utils.ipv6_ipv4_mapped_test.rst b/docs/ansible.utils.ipv6_ipv4_mapped_test.rst index da6e49f..42141a9 100644 --- a/docs/ansible.utils.ipv6_ipv4_mapped_test.rst +++ b/docs/ansible.utils.ipv6_ipv4_mapped_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['::FFFF:10.1.1.1', '::AAAA:10.1.1.1', 'helloworld']}
+
For example: ::FFFF:10.1.1.1, ::AAAA:10.1.1.1, or "helloworld"
diff --git a/docs/ansible.utils.ipv6_sixtofour_test.rst b/docs/ansible.utils.ipv6_sixtofour_test.rst index f6e6e99..6770741 100644 --- a/docs/ansible.utils.ipv6_sixtofour_test.rst +++ b/docs/ansible.utils.ipv6_sixtofour_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['2002:c0a8:6301:1::1', '::AAAA:10.1.1.1', 'hello_world']}
+
For example: 2002:c0a8:6301:1::1, ::AAAA:10.1.1.1, or "hello_world"
diff --git a/docs/ansible.utils.ipv6_teredo_test.rst b/docs/ansible.utils.ipv6_teredo_test.rst index 9aae874..87457ed 100644 --- a/docs/ansible.utils.ipv6_teredo_test.rst +++ b/docs/ansible.utils.ipv6_teredo_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['2001::c0a8:6301:1', '2002::c0a8:6301:1', 'hello_world']}
+
For example: 2001::c0a8:6301:1, 2002::c0a8:6301:1, or "hello_world"
diff --git a/docs/ansible.utils.ipv6_test.rst b/docs/ansible.utils.ipv6_test.rst index e3f567c..41fa503 100644 --- a/docs/ansible.utils.ipv6_test.rst +++ b/docs/ansible.utils.ipv6_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', '10.0.0.0/8', 'fe80::216:3eff:fee4:16f3']}
+
For example: 10.1.1.1, 10.0.0.0/8, or fe80::216:3eff:fee4:16f3
diff --git a/docs/ansible.utils.loopback_test.rst b/docs/ansible.utils.loopback_test.rst index c4927ee..e116724 100644 --- a/docs/ansible.utils.loopback_test.rst +++ b/docs/ansible.utils.loopback_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['127.0.0.1', '2002::c0a8:6301:1']}
+
For example: 127.0.0.1 or 2002::c0a8:6301:1
diff --git a/docs/ansible.utils.mac_test.rst b/docs/ansible.utils.mac_test.rst index f0de524..227ea4e 100644 --- a/docs/ansible.utils.mac_test.rst +++ b/docs/ansible.utils.mac_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['02:16:3e:e4:16:f3', '02-16-3e-e4-16-f3', '0216.3ee4.16f3', '02163ee416f3']}
+
For example: 02:16:3e:e4:16:f3, 02-16-3e-e4-16-f3, 0216.3ee4.16f3, or 02163ee416f3
diff --git a/docs/ansible.utils.multicast_test.rst b/docs/ansible.utils.multicast_test.rst index a84d051..696f3b4 100644 --- a/docs/ansible.utils.multicast_test.rst +++ b/docs/ansible.utils.multicast_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['224.0.0.1', '127.0.0.1']}
+
For example: 224.0.0.1 or 127.0.0.1
diff --git a/docs/ansible.utils.private_test.rst b/docs/ansible.utils.private_test.rst index 12fa23f..345adba 100644 --- a/docs/ansible.utils.private_test.rst +++ b/docs/ansible.utils.private_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['10.1.1.1', '8.8.8.8', '192.168.1.250']}
+
For example: 10.1.1.1, 8.8.8.8, or 192.168.1.250
diff --git a/docs/ansible.utils.public_test.rst b/docs/ansible.utils.public_test.rst index f3d8727..c895df6 100644 --- a/docs/ansible.utils.public_test.rst +++ b/docs/ansible.utils.public_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['8.8.8.8', '10.1.1.1', '192.168.1.250']}
+
For example: 8.8.8.8, 10.1.1.1, or 192.168.1.250
diff --git a/docs/ansible.utils.reserved_test.rst b/docs/ansible.utils.reserved_test.rst index 6dabece..cefd743 100644 --- a/docs/ansible.utils.reserved_test.rst +++ b/docs/ansible.utils.reserved_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['253.0.0.1', '128.146.1.7']}
+
For example: 253.0.0.1 or 128.146.1.7
diff --git a/docs/ansible.utils.resolvable_test.rst b/docs/ansible.utils.resolvable_test.rst index 45dda16..a1fe6ef 100644 --- a/docs/ansible.utils.resolvable_test.rst +++ b/docs/ansible.utils.resolvable_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the IP address or the host name
-
{'For example': ['docs.ansible.com', '127.0.0.1', '::1']}
+
For example: "docs.ansible.com", 127.0.0.1, or ::1
diff --git a/docs/ansible.utils.subnet_of_test.rst b/docs/ansible.utils.subnet_of_test.rst index cd5d151..3248b49 100644 --- a/docs/ansible.utils.subnet_of_test.rst +++ b/docs/ansible.utils.subnet_of_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the first network address
-
{'For example': ['10.1.1.0/24']}
+
For example: 10.1.1.0/24
@@ -69,7 +69,7 @@ Parameters
A string that represents the second network address
-
{'For example': ['10.0.0.0/8']}
+
For example: 10.0.0.0/8
diff --git a/docs/ansible.utils.supernet_of_test.rst b/docs/ansible.utils.supernet_of_test.rst index 2b9b4ec..b6aac51 100644 --- a/docs/ansible.utils.supernet_of_test.rst +++ b/docs/ansible.utils.supernet_of_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the first network address
-
{'For example': ['10.1.1.0/24']}
+
For example: 10.1.1.0/24
@@ -69,7 +69,7 @@ Parameters
A string that represents the second network address
-
{'For example': ['10.0.0.0/8']}
+
For example: 10.0.0.0/8
diff --git a/docs/ansible.utils.unspecified_test.rst b/docs/ansible.utils.unspecified_test.rst index ef93539..02adbf8 100644 --- a/docs/ansible.utils.unspecified_test.rst +++ b/docs/ansible.utils.unspecified_test.rst @@ -50,7 +50,7 @@ Parameters
A string that represents the value against which the test is going to be performed
-
{'For example': ['0.0.0.0', '0:0:0:0:0:0:0:0', '::', '::1']}
+
For example: 0.0.0.0, 0:0:0:0:0:0:0:0, ::, or ::1
diff --git a/docs/ansible.utils.usable_range_filter.rst b/docs/ansible.utils.usable_range_filter.rst index 6fa99f4..664ba00 100644 --- a/docs/ansible.utils.usable_range_filter.rst +++ b/docs/ansible.utils.usable_range_filter.rst @@ -50,7 +50,7 @@ Parameters
A string that represents an IP address of network in CIDR form
-
{'For example': ['10.0.0.0/24', '2001:db8:abcd:0012::0/124']}
+
For example: 10.0.0.0/24 or 2001:db8:abcd:0012::0/124
diff --git a/plugins/filter/index_of.py b/plugins/filter/index_of.py index e6ac207..e79ebab 100644 --- a/plugins/filter/index_of.py +++ b/plugins/filter/index_of.py @@ -40,7 +40,7 @@ DOCUMENTATION = """ value: description: - The value used to test each list item against. - - Not required for simple tests (eg: C(true), C(false), C(even), C(odd)) + - 'Not required for simple tests (eg: C(true), C(false), C(even), C(odd))' - May be a C(string), C(boolean), C(number), C(regular expression) C(dict) and so on, depending on the C(test) used type: raw key: diff --git a/plugins/filter/ipaddr.py b/plugins/filter/ipaddr.py index 9c7fb81..d760e1b 100644 --- a/plugins/filter/ipaddr.py +++ b/plugins/filter/ipaddr.py @@ -61,10 +61,11 @@ DOCUMENTATION = """ description: - You can provide a single argument to each ipaddr() filter. - The filter will then treat it as a query and return values modified by that query. - - Types of queries include: - - query by name: ansible.utils.ipaddr('address'), ansible.utils.ipv4('network'); - - query by CIDR range: ansible.utils.ipaddr('192.168.0.0/24'), ansible.utils.ipv6('2001:db8::/32'); - - query by index number: ansible.utils.ipaddr('1'), ansible.utils.ipaddr('-1'); + - >- + Types of queries include: + 1. query by name: ansible.utils.ipaddr('address'), ansible.utils.ipv4('network'); + 2. query by CIDR range: ansible.utils.ipaddr('192.168.0.0/24'), ansible.utils.ipv6('2001:db8::/32'); + 3. query by index number: ansible.utils.ipaddr('1'), ansible.utils.ipaddr('-1'); type: str default: '' version: diff --git a/plugins/filter/usable_range.py b/plugins/filter/usable_range.py index bdfafa5..ca69da7 100644 --- a/plugins/filter/usable_range.py +++ b/plugins/filter/usable_range.py @@ -31,9 +31,7 @@ DOCUMENTATION = """ ip: description: - A string that represents an IP address of network in CIDR form - - For example: - - "10.0.0.0/24" - - "2001:db8:abcd:0012::0/124" + - 'For example: C(10.0.0.0/24) or C(2001:db8:abcd:0012::0/124)' type: str required: True notes: diff --git a/plugins/test/in_any_network.py b/plugins/test/in_any_network.py index 5612476..970451b 100644 --- a/plugins/test/in_any_network.py +++ b/plugins/test/in_any_network.py @@ -26,13 +26,13 @@ DOCUMENTATION = """ ip: description: - A string that represents an IP address of a host or network - - For example: "10.1.1.1" + - 'For example: C(10.1.1.1)' type: str required: True networks: description: - A list of string and each string represents a network address in CIDR form - - For example: ['10.0.0.0/8', '192.168.1.0/24'] + - "For example: C(['10.0.0.0/8', '192.168.1.0/24'])" type: list required: True notes: diff --git a/plugins/test/in_network.py b/plugins/test/in_network.py index 2d24c97..0936146 100644 --- a/plugins/test/in_network.py +++ b/plugins/test/in_network.py @@ -30,13 +30,13 @@ DOCUMENTATION = """ ip: description: - A string that represents an IP address - - For example: "10.1.1.1" + - 'For example: C(10.1.1.1)' type: str required: True network: description: - A string that represents the network address in CIDR form - - For example: "10.0.0.0/8" + - 'For example: C(10.0.0.0/8)' type: str required: True notes: diff --git a/plugins/test/in_one_network.py b/plugins/test/in_one_network.py index 4dfe25d..39a1ca8 100644 --- a/plugins/test/in_one_network.py +++ b/plugins/test/in_one_network.py @@ -28,13 +28,13 @@ DOCUMENTATION = """ ip: description: - A string that represents an IP address - - For example: "10.1.1.1" + - 'For example: C(10.1.1.1)' type: str required: True networks: description: - A list of string and each string represents a network address in CIDR form - - For example: ['10.0.0.0/8', '192.168.1.0/24'] + - "For example: C(['10.0.0.0/8', '192.168.1.0/24'])" type: list required: True notes: diff --git a/plugins/test/ip.py b/plugins/test/ip.py index 9219c05..a408bea 100644 --- a/plugins/test/ip.py +++ b/plugins/test/ip.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "2001:db8:a::123" - - "hello-world" + - 'For example: C(10.1.1.1), C(2001:db8:a::123), or C("hello-world")' type: str required: True notes: diff --git a/plugins/test/ip_address.py b/plugins/test/ip_address.py index b4b1822..fdbb6bc 100644 --- a/plugins/test/ip_address.py +++ b/plugins/test/ip_address.py @@ -29,9 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "hello-world" + - 'For example: C(10.1.1.1) or C("hello-world")' type: str required: True notes: diff --git a/plugins/test/ipv4.py b/plugins/test/ipv4.py index 626b546..5bbd342 100644 --- a/plugins/test/ipv4.py +++ b/plugins/test/ipv4.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "10.0.0.0/8" - - "fe80::216:3eff:fee4:16f3" + - 'For example: C(10.1.1.1), C(10.0.0.0/8), or C(fe80::216:3eff:fee4:16f3)' type: str required: True notes: diff --git a/plugins/test/ipv4_address.py b/plugins/test/ipv4_address.py index 2068890..40d922c 100644 --- a/plugins/test/ipv4_address.py +++ b/plugins/test/ipv4_address.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "10.0.0.0/8" - - "fe80::216:3eff:fee4:16f3" + - 'For example: C(10.1.1.1), C(10.0.0.0/8), or C(fe80::216:3eff:fee4:16f3)' type: str required: True notes: diff --git a/plugins/test/ipv4_hostmask.py b/plugins/test/ipv4_hostmask.py index 4ccf541..fc289a3 100644 --- a/plugins/test/ipv4_hostmask.py +++ b/plugins/test/ipv4_hostmask.py @@ -29,9 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "0.1.255.255" - - "255.255.255.0" + - 'For example: C(0.1.255.255) or C(255.255.255.0)' type: str required: True notes: diff --git a/plugins/test/ipv4_netmask.py b/plugins/test/ipv4_netmask.py index aba5b17..122bb32 100644 --- a/plugins/test/ipv4_netmask.py +++ b/plugins/test/ipv4_netmask.py @@ -29,9 +29,7 @@ DOCUMENTATION = """ mask: description: - A string that represents the value against which the test is going to be performed - - For example: - - "0.1.255.255" - - "255.255.255.0" + - 'For example: C(0.1.255.255) or C(255.255.255.0)' type: str required: True notes: diff --git a/plugins/test/ipv6.py b/plugins/test/ipv6.py index a24e3f7..18d3145 100644 --- a/plugins/test/ipv6.py +++ b/plugins/test/ipv6.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "10.0.0.0/8" - - "fe80::216:3eff:fee4:16f3" + - 'For example: C(10.1.1.1), C(10.0.0.0/8), or C(fe80::216:3eff:fee4:16f3)' type: str required: True notes: diff --git a/plugins/test/ipv6_address.py b/plugins/test/ipv6_address.py index 56479d4..64492b1 100644 --- a/plugins/test/ipv6_address.py +++ b/plugins/test/ipv6_address.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "10.0.0.0/8" - - "fe80::216:3eff:fee4:16f3" + - 'For example: C(10.1.1.1), C(10.0.0.0/8), or C(fe80::216:3eff:fee4:16f3)' type: str required: True notes: diff --git a/plugins/test/ipv6_ipv4_mapped.py b/plugins/test/ipv6_ipv4_mapped.py index c34a9c7..e556c56 100644 --- a/plugins/test/ipv6_ipv4_mapped.py +++ b/plugins/test/ipv6_ipv4_mapped.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "::FFFF:10.1.1.1" - - "::AAAA:10.1.1.1" - - "helloworld" + - 'For example: C(::FFFF:10.1.1.1), C(::AAAA:10.1.1.1), or C("helloworld")' type: str required: True notes: diff --git a/plugins/test/ipv6_sixtofour.py b/plugins/test/ipv6_sixtofour.py index 069e8b4..18c2eb2 100644 --- a/plugins/test/ipv6_sixtofour.py +++ b/plugins/test/ipv6_sixtofour.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "2002:c0a8:6301:1::1" - - "::AAAA:10.1.1.1" - - "hello_world" + - 'For example: C(2002:c0a8:6301:1::1), C(::AAAA:10.1.1.1), or C("hello_world")' type: str required: True notes: diff --git a/plugins/test/ipv6_teredo.py b/plugins/test/ipv6_teredo.py index 4f6f0fb..934c9ab 100644 --- a/plugins/test/ipv6_teredo.py +++ b/plugins/test/ipv6_teredo.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "2001::c0a8:6301:1" - - "2002::c0a8:6301:1" - - "hello_world" + - 'For example: C(2001::c0a8:6301:1), C(2002::c0a8:6301:1), or C("hello_world")' type: str required: True notes: diff --git a/plugins/test/loopback.py b/plugins/test/loopback.py index cb51de0..c7df64e 100644 --- a/plugins/test/loopback.py +++ b/plugins/test/loopback.py @@ -29,9 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "127.0.0.1" - - "2002::c0a8:6301:1" + - 'For example: C(127.0.0.1) or C(2002::c0a8:6301:1)' type: str required: True notes: diff --git a/plugins/test/mac.py b/plugins/test/mac.py index 4f3e423..9a74d14 100644 --- a/plugins/test/mac.py +++ b/plugins/test/mac.py @@ -27,11 +27,7 @@ DOCUMENTATION = """ mac: description: - A string that represents the value against which the test is going to be performed - - For example: - - "02:16:3e:e4:16:f3" - - "02-16-3e-e4-16-f3" - - "0216.3ee4.16f3" - - "02163ee416f3" + - 'For example: C(02:16:3e:e4:16:f3), C(02-16-3e-e4-16-f3), C(0216.3ee4.16f3), or C(02163ee416f3)' type: str required: True notes: diff --git a/plugins/test/multicast.py b/plugins/test/multicast.py index 9515299..acc2ba1 100644 --- a/plugins/test/multicast.py +++ b/plugins/test/multicast.py @@ -29,9 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "224.0.0.1" - - "127.0.0.1" + - 'For example: C(224.0.0.1) or C(127.0.0.1)' type: str required: True notes: diff --git a/plugins/test/private.py b/plugins/test/private.py index 830e29c..737ecd1 100644 --- a/plugins/test/private.py +++ b/plugins/test/private.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "10.1.1.1" - - "8.8.8.8" - - "192.168.1.250" + - 'For example: C(10.1.1.1), C(8.8.8.8), or C(192.168.1.250)' type: str required: True notes: diff --git a/plugins/test/public.py b/plugins/test/public.py index 763a709..19abc3e 100644 --- a/plugins/test/public.py +++ b/plugins/test/public.py @@ -29,10 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "8.8.8.8" - - "10.1.1.1" - - "192.168.1.250" + - 'For example: C(8.8.8.8), C(10.1.1.1), or C(192.168.1.250)' type: str required: True notes: diff --git a/plugins/test/reserved.py b/plugins/test/reserved.py index b56abea..94a9da2 100644 --- a/plugins/test/reserved.py +++ b/plugins/test/reserved.py @@ -29,9 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "253.0.0.1" - - "128.146.1.7" + - 'For example: C(253.0.0.1) or C(128.146.1.7)' type: str required: True notes: diff --git a/plugins/test/resolvable.py b/plugins/test/resolvable.py index f61a287..5461f24 100644 --- a/plugins/test/resolvable.py +++ b/plugins/test/resolvable.py @@ -36,10 +36,7 @@ DOCUMENTATION = """ host: description: - A string that represents the IP address or the host name - - For example: - - "docs.ansible.com" - - 127.0.0.1 - - ::1 + - 'For example: C("docs.ansible.com"), C(127.0.0.1), or C(::1)' type: str required: True notes: diff --git a/plugins/test/subnet_of.py b/plugins/test/subnet_of.py index 8c506b6..7897528 100644 --- a/plugins/test/subnet_of.py +++ b/plugins/test/subnet_of.py @@ -30,15 +30,13 @@ DOCUMENTATION = """ network_a: description: - A string that represents the first network address - - For example: - - "10.1.1.0/24" + - 'For example: C(10.1.1.0/24)' type: str required: True network_b: description: - A string that represents the second network address - - For example: - - "10.0.0.0/8" + - 'For example: C(10.0.0.0/8)' type: str required: True notes: diff --git a/plugins/test/supernet_of.py b/plugins/test/supernet_of.py index 780ea2d..38cca08 100644 --- a/plugins/test/supernet_of.py +++ b/plugins/test/supernet_of.py @@ -30,15 +30,13 @@ DOCUMENTATION = """ network_a: description: - A string that represents the first network address - - For example: - - "10.1.1.0/24" + - 'For example: C(10.1.1.0/24)' type: str required: True network_b: description: - A string that represents the second network address - - For example: - - "10.0.0.0/8" + - 'For example: C(10.0.0.0/8)' type: str required: True notes: diff --git a/plugins/test/unspecified.py b/plugins/test/unspecified.py index 7cbe833..9dcd272 100644 --- a/plugins/test/unspecified.py +++ b/plugins/test/unspecified.py @@ -29,11 +29,7 @@ DOCUMENTATION = """ ip: description: - A string that represents the value against which the test is going to be performed - - For example: - - "0.0.0.0" - - "0:0:0:0:0:0:0:0" - - "::" - - "::1" + - 'For example: C(0.0.0.0), C(0:0:0:0:0:0:0:0), C(::), or C(::1)' type: str required: True notes: