From 5eac93e7fde300f2beec2482f9e18accfe01270c Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Wed, 16 Oct 2019 18:43:25 +0200 Subject: [PATCH] [2.8] Fix return value documentation (2/2) (#63534) * Fix return value documentation (2/2) (#63478) * Avoid validation errors for missing 'contains:'. * Convert JSON text to JSON dict. * example -> sample. * Fix YAML. (cherry picked from commit 4bc298af8395310031ad20b45cbc8815b20fd5ec) * Update validate-modules/ignore.txt. --- .../cloud/vultr/vultr_block_storage_facts.py | 2 +- .../cloud/vultr/vultr_dns_domain_facts.py | 2 +- .../cloud/vultr/vultr_firewall_group_facts.py | 2 +- .../cloud/vultr/vultr_network_facts.py | 2 +- .../modules/cloud/vultr/vultr_os_facts.py | 2 +- .../modules/cloud/vultr/vultr_region_facts.py | 2 +- .../modules/cloud/vultr/vultr_server_facts.py | 2 +- .../cloud/vultr/vultr_ssh_key_facts.py | 2 +- .../cloud/vultr/vultr_startup_script_facts.py | 2 +- .../modules/cloud/vultr/vultr_user_facts.py | 2 +- .../database/postgresql/postgresql_info.py | 20 +++---- .../modules/net_tools/cloudflare_dns.py | 4 +- .../modules/network/f5/bigip_device_facts.py | 4 +- .../modules/network/ingate/ig_config.py | 26 ++++----- .../network/meraki/meraki_static_route.py | 20 +++---- .../modules/network/meraki/meraki_syslog.py | 4 +- .../packaging/os/redhat_subscription.py | 2 +- .../manageiq/manageiq_group.py | 4 +- .../storage/purestorage/purefa_facts.py | 31 +++++----- .../storage/purestorage/purefb_facts.py | 19 ++++--- lib/ansible/modules/system/parted.py | 57 +++++++++---------- lib/ansible/modules/system/service_facts.py | 2 +- lib/ansible/modules/system/systemd.py | 2 +- lib/ansible/modules/system/sysvinit.py | 35 ++++++------ .../sophos_utm/utm_aaa_group.py | 30 +++++----- .../sophos_utm/utm_aaa_group_info.py | 30 +++++----- .../sophos_utm/utm_ca_host_key_cert.py | 18 +++--- .../sophos_utm/utm_ca_host_key_cert_info.py | 18 +++--- .../utm_network_interface_address.py | 18 +++--- .../utm_network_interface_address_info.py | 18 +++--- .../sophos_utm/utm_proxy_auth_profile.py | 54 +++++++++--------- .../sophos_utm/utm_proxy_exception.py | 18 +++--- .../sophos_utm/utm_proxy_frontend.py | 20 +++---- .../sophos_utm/utm_proxy_frontend_info.py | 20 +++---- .../sophos_utm/utm_proxy_location.py | 24 ++++---- .../sophos_utm/utm_proxy_location_info.py | 24 ++++---- lib/ansible/modules/windows/win_find.py | 2 +- lib/ansible/modules/windows/win_stat.py | 2 +- test/sanity/validate-modules/ignore.txt | 15 +++++ 39 files changed, 289 insertions(+), 272 deletions(-) diff --git a/lib/ansible/modules/cloud/vultr/vultr_block_storage_facts.py b/lib/ansible/modules/cloud/vultr/vultr_block_storage_facts.py index 61f6f7ca624..00fe5c83d66 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_block_storage_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_block_storage_facts.py @@ -62,7 +62,7 @@ vultr_block_storage_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_block_storage_facts": [ { "attached_to_id": null, diff --git a/lib/ansible/modules/cloud/vultr/vultr_dns_domain_facts.py b/lib/ansible/modules/cloud/vultr/vultr_dns_domain_facts.py index 58c4706ed01..55cbfbeb68b 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_dns_domain_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_dns_domain_facts.py @@ -62,7 +62,7 @@ vultr_dns_domain_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_dns_domain_facts": [ { "date_created": "2018-07-19 07:14:21", diff --git a/lib/ansible/modules/cloud/vultr/vultr_firewall_group_facts.py b/lib/ansible/modules/cloud/vultr/vultr_firewall_group_facts.py index 44f900d50c9..b5b746a9e49 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_firewall_group_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_firewall_group_facts.py @@ -62,7 +62,7 @@ vultr_firewall_group_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_firewall_group_facts": [ { "date_created": "2018-07-12 10:27:14", diff --git a/lib/ansible/modules/cloud/vultr/vultr_network_facts.py b/lib/ansible/modules/cloud/vultr/vultr_network_facts.py index 2977f4ed560..4b155fa2bfc 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_network_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_network_facts.py @@ -62,7 +62,7 @@ vultr_network_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_network_facts": [ { "date_created": "2018-08-02 11:18:49", diff --git a/lib/ansible/modules/cloud/vultr/vultr_os_facts.py b/lib/ansible/modules/cloud/vultr/vultr_os_facts.py index 339753fbd9a..d44628fece7 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_os_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_os_facts.py @@ -63,7 +63,7 @@ ansible_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_os_facts": [ { "arch": "x64", diff --git a/lib/ansible/modules/cloud/vultr/vultr_region_facts.py b/lib/ansible/modules/cloud/vultr/vultr_region_facts.py index f3112972048..55f32d74ae6 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_region_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_region_facts.py @@ -63,7 +63,7 @@ vultr_region_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_region_facts": [ { "block_storage": false, diff --git a/lib/ansible/modules/cloud/vultr/vultr_server_facts.py b/lib/ansible/modules/cloud/vultr/vultr_server_facts.py index b94ef87c54d..c52991a9dfa 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_server_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_server_facts.py @@ -63,7 +63,7 @@ vultr_server_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_server_facts": [ { "allowed_bandwidth_gb": 1000, diff --git a/lib/ansible/modules/cloud/vultr/vultr_ssh_key_facts.py b/lib/ansible/modules/cloud/vultr/vultr_ssh_key_facts.py index 18682683572..f03bbacde27 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_ssh_key_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_ssh_key_facts.py @@ -63,7 +63,7 @@ ansible_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_ssh_key_facts": [ { "date_created": "2018-02-24 15:04:01", diff --git a/lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py b/lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py index cc41da43d12..4d0e1bd6edb 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py @@ -63,7 +63,7 @@ vultr_startup_script_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_startup_script_facts": [ { "date_created": "2018-07-19 08:38:36", diff --git a/lib/ansible/modules/cloud/vultr/vultr_user_facts.py b/lib/ansible/modules/cloud/vultr/vultr_user_facts.py index ae4324137fc..083a4800d34 100644 --- a/lib/ansible/modules/cloud/vultr/vultr_user_facts.py +++ b/lib/ansible/modules/cloud/vultr/vultr_user_facts.py @@ -62,7 +62,7 @@ vultr_user_facts: description: Response from Vultr API returned: success type: complex - contains: + sample: "vultr_user_facts": [ { "acls": [], diff --git a/lib/ansible/modules/database/postgresql/postgresql_info.py b/lib/ansible/modules/database/postgresql/postgresql_info.py index df8964e394e..f394a5f0a97 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_info.py +++ b/lib/ansible/modules/database/postgresql/postgresql_info.py @@ -192,16 +192,16 @@ databases: returned: always type: dict contains: - major: - description: Extension major version. - returned: always - type: int - sample: 1 - minor: - description: Extension minor version. - returned: always - type: int - sample: 0 + major: + description: Extension major version. + returned: always + type: int + sample: 1 + minor: + description: Extension minor version. + returned: always + type: int + sample: 0 nspname: description: Namespace where the extension is. returned: always diff --git a/lib/ansible/modules/net_tools/cloudflare_dns.py b/lib/ansible/modules/net_tools/cloudflare_dns.py index 7dd9008bff7..ce2174b5c57 100644 --- a/lib/ansible/modules/net_tools/cloudflare_dns.py +++ b/lib/ansible/modules/net_tools/cloudflare_dns.py @@ -270,7 +270,7 @@ record: description: The record creation date. returned: success type: str - sample: 2016-03-25T19:09:42.516553Z + sample: "2016-03-25T19:09:42.516553Z" data: description: Additional record data. returned: success, if type is SRV, DS, SSHFP or TLSA @@ -303,7 +303,7 @@ record: description: Record modification date. returned: success type: str - sample: 2016-03-25T19:09:42.516553Z + sample: "2016-03-25T19:09:42.516553Z" name: description: The record name as FQDN (including _service and _proto for SRV). returned: success diff --git a/lib/ansible/modules/network/f5/bigip_device_facts.py b/lib/ansible/modules/network/f5/bigip_device_facts.py index 9d4973d028e..3117f3cb51a 100644 --- a/lib/ansible/modules/network/f5/bigip_device_facts.py +++ b/lib/ansible/modules/network/f5/bigip_device_facts.py @@ -3077,7 +3077,7 @@ ltm_pools: type: str sample: pass-through current_sessions: - descriptions: + description: - Current sessions. returned: changed type: int @@ -5149,7 +5149,7 @@ tcp_profiles: type: bool sample: no mptcp_rto_max: - decription: + description: - Specifies the number of RTOs (retransmission timeouts) before declaring the subflow dead. type: int diff --git a/lib/ansible/modules/network/ingate/ig_config.py b/lib/ansible/modules/network/ingate/ig_config.py index cfc8ae16a14..3a80aa7c83a 100644 --- a/lib/ansible/modules/network/ingate/ig_config.py +++ b/lib/ansible/modules/network/ingate/ig_config.py @@ -268,7 +268,7 @@ add: href: description: The REST API URL to the added row returned: success - type: string + type: str sample: http://192.168.1.1/api/v1/misc/dns_servers/2 data: description: Column names/values @@ -288,7 +288,7 @@ delete: table: description: The name of the table returned: success - type: string + type: str sample: misc.dns_servers data: description: Column names/values @@ -308,12 +308,12 @@ get: table: description: The name of the table returned: success - type: string + type: str sample: Testname href: description: The REST API URL to the row returned: success - type: string + type: str sample: http://192.168.1.1/api/v1/misc/dns_servers/1 data: description: Column names/values @@ -333,18 +333,18 @@ modify: table: description: The name of the table returned: success - type: string + type: str sample: Testname href: description: The REST API URL to the modified row returned: success - type: string + type: str sample: http://192.168.1.1/api/v1/misc/dns_servers/1 data: description: Column names/values returned: success type: complex - gsample: {'number': '2', 'server': '10.48.254.33'} + sample: {'number': '2', 'server': '10.48.254.33'} id: description: The row id returned: success @@ -358,7 +358,7 @@ revert: msg: description: The command status message returned: success - type: string + type: str sample: reverted the configuration to the last applied configuration. factory: description: A command status message @@ -368,7 +368,7 @@ factory: msg: description: The command status message returned: success - type: string + type: str sample: reverted the configuration to the factory configuration. store: description: A command status message @@ -378,7 +378,7 @@ store: msg: description: The command status message returned: success - type: string + type: str sample: Successfully applied and saved the configuration. return_rowid: description: The matched row id(s). @@ -393,16 +393,16 @@ download: config: description: The configuration database returned: success - type: string + type: str filename: description: A suggested name for the configuration returned: success - type: string + type: str sample: testname_2018-10-01T214040.cfg mimetype: description: The mimetype returned: success - type: string + type: str sample: application/x-config-database ''' diff --git a/lib/ansible/modules/network/meraki/meraki_static_route.py b/lib/ansible/modules/network/meraki/meraki_static_route.py index 304eaa16d5b..804ed519d58 100644 --- a/lib/ansible/modules/network/meraki/meraki_static_route.py +++ b/lib/ansible/modules/network/meraki/meraki_static_route.py @@ -162,27 +162,27 @@ data: id: description: Unique identification string assigned to each static route. returned: success - type: string + type: str sample: d6fa4821-1234-4dfa-af6b-ae8b16c20c39 net_id: description: Identification string of network. returned: query or update - type: string + type: str sample: N_12345 name: description: Name of static route. returned: success - type: string + type: str sample: Data Center static route subnet: description: CIDR notation subnet for static route. returned: success - type: string + type: str sample: 192.0.1.0/24 gatewayIp: description: Next hop IP address. returned: success - type: string + type: str sample: 192.1.1.1 enabled: description: Enabled state of static route. @@ -197,17 +197,17 @@ data: start: description: First address in reservation range, inclusive. returned: query or update - type: string + type: str sample: 192.0.1.2 end: description: Last address in reservation range, inclusive. returned: query or update - type: string + type: str sample: 192.0.1.10 comment: description: Human readable description of range. returned: query or update - type: string + type: str sample: Server range fixedIpAssignments: description: List of static MAC to IP address bindings. @@ -222,12 +222,12 @@ data: ip: description: IP address to be bound to the endpoint. returned: query or update - type: string + type: str sample: 192.0.1.11 name: description: Hostname given to the endpoint. returned: query or update - type: string + type: str sample: JimLaptop ''' diff --git a/lib/ansible/modules/network/meraki/meraki_syslog.py b/lib/ansible/modules/network/meraki/meraki_syslog.py index e4d42589d76..5dca751fd93 100644 --- a/lib/ansible/modules/network/meraki/meraki_syslog.py +++ b/lib/ansible/modules/network/meraki/meraki_syslog.py @@ -130,12 +130,12 @@ data: host: description: Hostname or IP address of syslog server. returned: success - type: string + type: str sample: 192.0.1.1 port: description: Port number for syslog communication. returned: success - type: string + type: str sample: 443 roles: description: List of roles assigned to syslog server. diff --git a/lib/ansible/modules/packaging/os/redhat_subscription.py b/lib/ansible/modules/packaging/os/redhat_subscription.py index fa1beb57282..5f39d4a7076 100644 --- a/lib/ansible/modules/packaging/os/redhat_subscription.py +++ b/lib/ansible/modules/packaging/os/redhat_subscription.py @@ -208,7 +208,7 @@ subscribed_pool_ids: description: List of pool IDs to which system is now subscribed returned: success type: complex - contains: { + sample: { "8a85f9815ab905d3015ab928c7005de4": "1" } ''' diff --git a/lib/ansible/modules/remote_management/manageiq/manageiq_group.py b/lib/ansible/modules/remote_management/manageiq/manageiq_group.py index 32d8b0bade8..9204fa7058f 100644 --- a/lib/ansible/modules/remote_management/manageiq/manageiq_group.py +++ b/lib/ansible/modules/remote_management/manageiq/manageiq_group.py @@ -199,12 +199,12 @@ group: description: Group creation date returned: success type: str - example: 2018-08-12T08:37:55+00:00 + sample: "2018-08-12T08:37:55+00:00" updated_on: description: Group update date returned: success type: int - example: 2018-08-12T08:37:55+00:00 + sample: "2018-08-12T08:37:55+00:00" ''' from ansible.module_utils.basic import AnsibleModule diff --git a/lib/ansible/modules/storage/purestorage/purefa_facts.py b/lib/ansible/modules/storage/purestorage/purefa_facts.py index e43581a5e2a..940f5bcffbf 100644 --- a/lib/ansible/modules/storage/purestorage/purefa_facts.py +++ b/lib/ansible/modules/storage/purestorage/purefa_facts.py @@ -65,8 +65,8 @@ ansible_facts: description: Returns the facts collected from the FlashArray returned: always type: complex - contains: - "capacity": {} + sample: { + "capacity": {}, "config": { "directory_service": { "array_admin_group": null, @@ -131,7 +131,7 @@ ansible_facts: "valid_to": "2027-08-09T23:09:06Z" }, "syslog": [] - } + }, "default": { "array_name": "flasharray1", "connected_arrays": 1, @@ -142,8 +142,8 @@ ansible_facts: "purity_version": "5.0.4", "snapshots": 1, "volume_groups": 2 - } - "hgroups": {} + }, + "hgroups": {}, "hosts": { "host1": { "hgroup": null, @@ -176,13 +176,13 @@ ansible_facts: "10000000C96C48D2" ] } - } + }, "interfaces": { "CT0.ETH4": "iqn.2010-06.com.purestorage:flasharray.2111b767484e4682", "CT0.ETH5": "iqn.2010-06.com.purestorage:flasharray.2111b767484e4682", "CT1.ETH4": "iqn.2010-06.com.purestorage:flasharray.2111b767484e4682", "CT1.ETH5": "iqn.2010-06.com.purestorage:flasharray.2111b767484e4682" - } + }, "network": { "ct0.eth0": { "address": "10.10.10.10", @@ -250,7 +250,7 @@ ansible_facts: ], "speed": 1000000000 } - } + }, "offload": { "nfstarget": { "address": "10.0.2.53", @@ -259,7 +259,7 @@ ansible_facts: "protocol": "nfs", "status": "scanning" } - } + }, "performance": { "input_per_sec": 8191, "output_per_sec": 0, @@ -269,7 +269,7 @@ ansible_facts: "usec_per_read_op": 0, "usec_per_write_op": 642, "writes_per_sec": 2 - } + }, "pgroups": { "consisgroup-07b6b983-986e-46f5-bdc3-deaa3dbb299e-cinder": { "hgroups": null, @@ -280,7 +280,7 @@ ansible_facts: "volume-1" ] } - } + }, "pods": { "srm-pod": { "arrays": [ @@ -299,22 +299,22 @@ ansible_facts: ], "source": null } - } + }, "snapshots": { "consisgroup.cgsnapshot": { "created": "2018-03-28T09:34:02Z", "size": 13958643712, "source": "volume-1" } - } - "subnet": {} + }, + "subnet": {}, "vgroups": { "vvol--vSphere-HA-0ffc7dd1-vg": { "volumes": [ "vvol--vSphere-HA-0ffc7dd1-vg/Config-aad5d7c6" ] } - } + }, "volumes": { "ansible_data": { "bandwidth": null, @@ -329,6 +329,7 @@ ansible_facts: "source": null } } + } ''' diff --git a/lib/ansible/modules/storage/purestorage/purefb_facts.py b/lib/ansible/modules/storage/purestorage/purefb_facts.py index a122f82c4e2..0e7fd948af2 100644 --- a/lib/ansible/modules/storage/purestorage/purefb_facts.py +++ b/lib/ansible/modules/storage/purestorage/purefb_facts.py @@ -65,7 +65,7 @@ ansible_facts: description: Returns the facts collected from the FlashBlade returned: always type: complex - contains: + sample: { "capacity": { "aggregate": { "data_reduction": 1.1179228, @@ -89,7 +89,7 @@ ansible_facts: "virtual": 6477716992 }, "total": 83359896948925 - } + }, "config": { "alert_watchers": { "enabled": true, @@ -184,7 +184,7 @@ ansible_facts: "valid_from": "1508433967000", "valid_to": "2458833967000" } - } + }, "default": { "blades": 15, "buckets": 7, @@ -195,7 +195,7 @@ ansible_facts: "purity_version": "2.2.0", "snapshots": 1, "total_capacity": 83359896948925 - } + }, "filesystems": { "k8s-pvc-d24b1357-579e-11e8-811f-ecf4bbc88f54": { "destroyed": false, @@ -212,7 +212,7 @@ ansible_facts: "provisioned": 1073741824, "snapshot_enabled": false } - } + }, "lag": { "uplink": { "lag_speed": 0, @@ -227,7 +227,7 @@ ansible_facts: ], "status": "healthy" } - } + }, "network": { "fm1.admin0": { "address": "10.10.100.6", @@ -273,7 +273,7 @@ ansible_facts: "type": "vip", "vlan": 2200 } - } + }, "performance": { "aggregate": { "bytes_per_op": 0, @@ -323,7 +323,7 @@ ansible_facts: "write_bytes_per_sec": 0, "writes_per_sec": 0 } - } + }, "snapshots": { "z.188": { "destroyed": false, @@ -331,7 +331,7 @@ ansible_facts: "source_destroyed": false, "suffix": "188" } - } + }, "subnet": { "new-mgmt": { "gateway": "10.10.100.1", @@ -360,6 +360,7 @@ ansible_facts: "vlan": 2200 } } + } ''' diff --git a/lib/ansible/modules/system/parted.py b/lib/ansible/modules/system/parted.py index 439fd21a48d..5d27a3bdb8f 100644 --- a/lib/ansible/modules/system/parted.py +++ b/lib/ansible/modules/system/parted.py @@ -115,35 +115,34 @@ partition_info: partitions: description: List of device partitions. type: list - sample: > - { - "disk": { - "dev": "/dev/sdb", - "logical_block": 512, - "model": "VMware Virtual disk", - "physical_block": 512, - "size": 5.0, - "table": "msdos", - "unit": "gib" - }, - "partitions": [{ - "begin": 0.0, - "end": 1.0, - "flags": ["boot", "lvm"], - "fstype": "", - "name": "", - "num": 1, - "size": 1.0 - }, { - "begin": 1.0, - "end": 5.0, - "flags": [], - "fstype": "", - "name": "", - "num": 2, - "size": 4.0 - }] - } + sample: { + "disk": { + "dev": "/dev/sdb", + "logical_block": 512, + "model": "VMware Virtual disk", + "physical_block": 512, + "size": 5.0, + "table": "msdos", + "unit": "gib" + }, + "partitions": [{ + "begin": 0.0, + "end": 1.0, + "flags": ["boot", "lvm"], + "fstype": "", + "name": "", + "num": 1, + "size": 1.0 + }, { + "begin": 1.0, + "end": 5.0, + "flags": [], + "fstype": "", + "name": "", + "num": 2, + "size": 4.0 + }] + } ''' EXAMPLES = r''' diff --git a/lib/ansible/modules/system/service_facts.py b/lib/ansible/modules/system/service_facts.py index ce61b0918e4..d0055f03e58 100644 --- a/lib/ansible/modules/system/service_facts.py +++ b/lib/ansible/modules/system/service_facts.py @@ -67,7 +67,7 @@ ansible_facts: status: description: State of the service. Either C(enabled), C(disabled), or C(unknown). returned: systemd systems or RedHat/SUSE flavored sysvinit/upstart - type: string + type: str sample: enabled name: description: Name of the service. diff --git a/lib/ansible/modules/system/systemd.py b/lib/ansible/modules/system/systemd.py index 0f652db94ed..773711666fb 100644 --- a/lib/ansible/modules/system/systemd.py +++ b/lib/ansible/modules/system/systemd.py @@ -135,7 +135,7 @@ status: description: A dictionary with the key=value pairs returned from `systemctl show` returned: success type: complex - contains: { + sample: { "ActiveEnterTimestamp": "Sun 2016-05-15 18:28:49 EDT", "ActiveEnterTimestampMonotonic": "8135942", "ActiveExitTimestampMonotonic": "0", diff --git a/lib/ansible/modules/system/sysvinit.py b/lib/ansible/modules/system/sysvinit.py index 9de88726bb7..6df5c1fd38e 100644 --- a/lib/ansible/modules/system/sysvinit.py +++ b/lib/ansible/modules/system/sysvinit.py @@ -87,27 +87,28 @@ EXAMPLES = ''' - 5 ''' -RETURN = ''' +RETURN = r''' results: description: results from actions taken returned: always type: complex - contains: - "attempts": 1 - "changed": true - "name": "apache2" - "status": { - "enabled": { - "changed": true, - "rc": 0, - "stderr": "", - "stdout": "" - }, - "stopped": { - "changed": true, - "rc": 0, - "stderr": "", - "stdout": "Stopping web server: apache2.\n" + sample: { + "attempts": 1, + "changed": true, + "name": "apache2", + "status": { + "enabled": { + "changed": true, + "rc": 0, + "stderr": "", + "stdout": "" + }, + "stopped": { + "changed": true, + "rc": 0, + "stderr": "", + "stdout": "Stopping web server: apache2.\n" + } } } ''' diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group.py index 129da1d0943..6a35ff9a85a 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group.py @@ -137,55 +137,55 @@ result: contains: _ref: description: The reference name of the object. - type: string + type: str _locked: description: Whether or not the object is currently locked. - type: boolean + type: bool _type: description: The type of the object. - type: string + type: str name: description: The name of the object. - type: string + type: str adirectory_groups: description: List of Active Directory Groups. - type: string + type: str adirectory_groups_sids: description: List of Active Directory Groups SIDS. type: list backend_match: description: The backend to use. - type: string + type: str comment: description: The comment string. - type: string + type: str dynamic: description: Whether the group match is ipsec_dn or directory_group. - type: string + type: str edirectory_groups: description: List of eDirectory Groups. - type: string + type: str ipsec_dn: description: ipsec_dn identifier to match. - type: string + type: str ldap_attribute: description: The LDAP Attribute to match against. - type: string + type: str ldap_attribute_value: description: The LDAP Attribute Value to match against. - type: string + type: str members: description: List of member identifiers of the group. type: list network: description: The identifier of the network (network/aaa). - type: string + type: str radius_group: description: The radius group identifier. - type: string + type: str tacacs_group: description: The tacacs group identifier. - type: string + type: str """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py index 5e47df53072..92616944b2a 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_aaa_group_info.py @@ -54,55 +54,55 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str adirectory_groups: description: List of Active Directory Groups - type: string + type: str adirectory_groups_sids: description: List of Active Directory Groups SIDS type: list backend_match: description: The backend to use - type: string + type: str comment: description: The comment string - type: string + type: str dynamic: description: Whether the group match is ipsec_dn or directory_group - type: string + type: str edirectory_groups: description: List of eDirectory Groups - type: string + type: str ipsec_dn: description: ipsec_dn identifier to match - type: string + type: str ldap_attribute: description: The LDAP Attribute to match against - type: string + type: str ldap_attribute_value: description: The LDAP Attribute Value to match against - type: string + type: str members: description: List of member identifiers of the group type: list network: description: The identifier of the network (network/aaa) - type: string + type: str radius_group: description: The radius group identifier - type: string + type: str tacacs_group: description: The tacacs group identifier - type: string + type: str """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py index b1c8e93e892..189a5cd20ad 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert.py @@ -104,34 +104,34 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str ca: description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. - type: string + type: str meta: description: A reference to an existing utm_ca_meta_x509 object. - type: string + type: str certificate: description: The certificate in PEM format - type: string + type: str comment: description: Comment string (may be empty string) - type: string + type: str encrypted: description: If encryption is enabled type: bool key: description: Private key in PEM format (may be empty string) - type: string + type: str """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py index 49b638a61d0..e617e3ca18e 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_ca_host_key_cert_info.py @@ -53,34 +53,34 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str ca: description: A reference to an existing utm_ca_signing_ca or utm_ca_verification_ca object. - type: string + type: str meta: description: A reference to an existing utm_ca_meta_x509 object. - type: string + type: str certificate: description: The certificate in PEM format - type: string + type: str comment: description: Comment string (may be empty string) - type: string + type: str encrypted: description: If encryption is enabled type: bool key: description: Private key in PEM format (may be empty string) - type: string + type: str """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py index d183a990add..eb375b0711f 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address.py @@ -82,31 +82,31 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str address: description: The ip4 address of the network/interface_address object - type: string + type: str address6: description: The ip6 address of the network/interface_address object - type: string + type: str comment: description: The comment string - type: string + type: str resolved: description: Whether or not the object is resolved - type: boolean + type: bool resolved6: description: Whether or not the object is resolved - type: boolean + type: bool """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py index f6244d95493..3eb3ed7d2c0 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_network_interface_address_info.py @@ -52,31 +52,31 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str address: description: The ip4 address of the network/interface_address object - type: string + type: str address6: description: The ip6 address of the network/interface_address object - type: string + type: str comment: description: The comment string - type: string + type: str resolved: description: Whether or not the object is resolved - type: boolean + type: bool resolved6: description: Whether or not the object is resolved - type: boolean + type: bool """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py index 1f61fe62d17..fe1c5ce4149 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_auth_profile.py @@ -205,91 +205,91 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str aaa: description: List of references to utm_aaa objects (allowed users or groups) type: list basic_prompt: description: The message in the basic authentication prompt - type: string + type: str backend_mode: description: Specifies if the backend server needs authentication ([Basic|None]) - type: string + type: str backend_strip_basic_auth: description: Should the login data be stripped when proxying the request to the backend host - type: boolean + type: bool backend_user_prefix: description: Prefix string to prepend to the username for backend authentication - type: string + type: str backend_user_suffix: description: Suffix string to append to the username for backend authentication - type: string + type: str comment: description: Optional comment string - type: string + type: str frontend_cookie: description: Frontend cookie name - type: string + type: str frontend_cookie_secret: description: Frontend cookie secret - type: string + type: str frontend_form: description: Frontend authentication form name - type: string + type: str frontend_form_template: description: Frontend authentication form template - type: string + type: str frontend_login: description: Frontend login name - type: string + type: str frontend_logout: description: Frontend logout name - type: string + type: str frontend_mode: description: Frontend authentication mode (Form|Basic) - type: string + type: str frontend_realm: description: Frontend authentication realm - type: string + type: str frontend_session_allow_persistency: description: Allow session persistency - type: boolean + type: bool frontend_session_lifetime: description: session lifetime - type: integer + type: int frontend_session_lifetime_limited: description: Specifies if limitation of session lifetime is active - type: boolean + type: bool frontend_session_lifetime_scope: description: scope for frontend_session_lifetime (days|hours|minutes) - type: string + type: str frontend_session_timeout: description: session timeout - type: integer + type: int frontend_session_timeout_enabled: description: Specifies if session timeout is active - type: boolean + type: bool frontend_session_timeout_scope: description: scope for frontend_session_timeout (days|hours|minutes) - type: string + type: str logout_delegation_urls: description: List of logout URLs that logouts are delegated to type: list logout_mode: description: Mode of logout (None|Delegation) - type: string + type: str redirect_to_requested_url: description: Should a redirect to the requested URL be made - type: boolean + type: bool """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py index 0695ab395bc..bd4e9b69aab 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_exception.py @@ -151,30 +151,30 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str comment: description: The optional comment string op: description: The operand to be used with the entries of the path parameter - type: string + type: str path: description: The paths the exception in the reverse proxy is defined for - type: array + type: list skip_custom_threats_filters: description: A list of threats to be skipped - type: array + type: list skip_threats_filter_categories: description: Define which categories of threats are skipped - type: array + type: list skipav: description: Skip the Antivirus Scanning type: bool @@ -201,7 +201,7 @@ result: type: bool source: description: Define which categories of threats are skipped - type: array + type: list """ from ansible.module_utils.utm_utils import UTM, UTMModule diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py index 483cabd0b84..863e02d891b 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend.py @@ -154,31 +154,31 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str add_content_type_header: description: Whether to add the content type header type: bool address: description: The reference name of the address - type: string + type: str allowed_networks: description: List of reference names of networks associated type: list certificate: description: Reference name of certificate (ca/host_key_cert) - type: string + type: str comment: description: The comment string - type: string + type: str disable_compression: description: State of compression support type: bool @@ -199,7 +199,7 @@ result: type: bool lbmethod: description: The method of loadbalancer to use - type: string + type: str locations: description: The reference names of reverse_proxy/locations associated with the object type: list @@ -211,13 +211,13 @@ result: type: bool profile: description: The associated reverse_proxy/profile - type: string + type: str status: description: Whether the frontend object is active or not type: bool type: description: The connection type - type: string + type: str xheaders: description: The xheaders state type: bool diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py index 07e4dd6d3df..df5a0aab3f8 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_frontend_info.py @@ -55,31 +55,31 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str add_content_type_header: description: Whether to add the content type header type: bool address: description: The reference name of the address - type: string + type: str allowed_networks: description: List of reference names of networks associated type: list certificate: description: Reference name of certificate (ca/host_key_cert) - type: string + type: str comment: description: The comment string - type: string + type: str disable_compression: description: State of compression support type: bool @@ -100,7 +100,7 @@ result: type: bool lbmethod: description: The method of loadbalancer to use - type: string + type: str locations: description: The reference names of reverse_proxy/locations associated with the object type: list @@ -112,13 +112,13 @@ result: type: bool profile: description: The associated reverse_proxy/profile - type: string + type: str status: description: Whether the frontend object is active or not type: bool type: description: The connection type - type: string + type: str xheaders: description: The xheaders state type: bool diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index d1d29c21158..f5a44414bb6 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -121,34 +121,34 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str access_control: description: Whether to use access control state - type: string + type: str allowed_networks: description: List of allowed network reference names type: list auth_profile: description: The auth profile reference name - type: string + type: str backend: description: The backend reference name - type: string + type: str be_path: description: The backend path - type: string + type: str comment: description: The comment string - type: string + type: str denied_networks: description: The list of the denied network names type: list @@ -157,13 +157,13 @@ result: type: bool path: description: Path name - type: string + type: str status: description: Whether the object is active or not - type: boolean + type: bool stickysession_id: description: The identifier of the stickysession - type: string + type: str stickysession_status: description: Whether to use stickysession or not type: bool diff --git a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py index 13c8196193a..a08178a2f6a 100644 --- a/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py +++ b/lib/ansible/modules/web_infrastructure/sophos_utm/utm_proxy_location_info.py @@ -54,34 +54,34 @@ result: contains: _ref: description: The reference name of the object - type: string + type: str _locked: description: Whether or not the object is currently locked - type: boolean + type: bool _type: description: The type of the object - type: string + type: str name: description: The name of the object - type: string + type: str access_control: description: Whether to use access control state - type: string + type: str allowed_networks: description: List of allowed network reference names type: list auth_profile: description: The auth profile reference name - type: string + type: str backend: description: The backend reference name - type: string + type: str be_path: description: The backend path - type: string + type: str comment: description: The comment string - type: string + type: str denied_networks: description: The list of the denied network names type: list @@ -90,13 +90,13 @@ result: type: bool path: description: Path name - type: string + type: str status: description: Whether the object is active or not - type: boolean + type: bool stickysession_id: description: The identifier of the stickysession - type: string + type: str stickysession_status: description: Whether to use stickysession or not type: bool diff --git a/lib/ansible/modules/windows/win_find.py b/lib/ansible/modules/windows/win_find.py index 996f01a698c..9c7ffc623b0 100644 --- a/lib/ansible/modules/windows/win_find.py +++ b/lib/ansible/modules/windows/win_find.py @@ -281,7 +281,7 @@ files: sample: 1477984205.15 lnk_source: description: The target of the symbolic link, will return null if not a link or the link is broken. - return: success, path exists, path is a symbolic link + returned: success, path exists, path is a symbolic link type: str sample: C:\temp owner: diff --git a/lib/ansible/modules/windows/win_stat.py b/lib/ansible/modules/windows/win_stat.py index 5a8b8a6579a..2a3633337d8 100644 --- a/lib/ansible/modules/windows/win_stat.py +++ b/lib/ansible/modules/windows/win_stat.py @@ -152,7 +152,7 @@ stat: description: The name of the file (without path). returned: success, path exists, path is a file type: str - sammple: foo.ini + sample: foo.ini hlnk_targets: description: List of other files pointing to the same file (hard links), excludes the current file. returned: success, path exists diff --git a/test/sanity/validate-modules/ignore.txt b/test/sanity/validate-modules/ignore.txt index bfb7326e1bd..2e44242603e 100644 --- a/test/sanity/validate-modules/ignore.txt +++ b/test/sanity/validate-modules/ignore.txt @@ -319,6 +319,16 @@ lib/ansible/modules/cloud/vmware/vca_vapp.py E322 lib/ansible/modules/cloud/vmware/vca_vapp.py E324 lib/ansible/modules/cloud/vmware/vmware_guest.py E322 lib/ansible/modules/cloud/vmware/vsphere_copy.py E322 +lib/ansible/modules/cloud/vultr/vultr_block_storage_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_dns_domain_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_firewall_group_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_network_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_os_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_region_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_server_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_ssh_key_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_startup_script_facts.py E319 +lib/ansible/modules/cloud/vultr/vultr_user_facts.py E319 lib/ansible/modules/clustering/consul.py E322 lib/ansible/modules/clustering/consul.py E324 lib/ansible/modules/clustering/consul_kv.py E322 @@ -707,6 +717,7 @@ lib/ansible/modules/packaging/os/portage.py E322 lib/ansible/modules/packaging/os/portinstall.py E322 lib/ansible/modules/packaging/os/pulp_repo.py E322 lib/ansible/modules/packaging/os/pulp_repo.py E324 +lib/ansible/modules/packaging/os/redhat_subscription.py E319 lib/ansible/modules/packaging/os/rhn_channel.py E322 lib/ansible/modules/packaging/os/rhn_channel.py E326 lib/ansible/modules/packaging/os/rhsm_repository.py E324 @@ -795,6 +806,8 @@ lib/ansible/modules/storage/netapp/netapp_e_volume_copy.py E323 lib/ansible/modules/storage/netapp/netapp_e_volume_copy.py E324 lib/ansible/modules/storage/netapp/netapp_e_volume_copy.py E326 lib/ansible/modules/storage/netapp/netapp_e_volume_copy.py E335 +lib/ansible/modules/storage/purestorage/purefa_facts.py E319 +lib/ansible/modules/storage/purestorage/purefb_facts.py E319 lib/ansible/modules/storage/purestorage/purefb_fs.py E324 lib/ansible/modules/storage/zfs/zfs.py E322 lib/ansible/modules/storage/zfs/zfs.py E323 @@ -807,7 +820,9 @@ lib/ansible/modules/system/runit.py E322 lib/ansible/modules/system/runit.py E324 lib/ansible/modules/system/service.py E210 lib/ansible/modules/system/service.py E323 +lib/ansible/modules/system/systemd.py E319 lib/ansible/modules/system/systemd.py E336 +lib/ansible/modules/system/sysvinit.py E319 lib/ansible/modules/system/user.py E210 lib/ansible/modules/system/user.py E324 lib/ansible/modules/system/user.py E327