diff --git a/plugins/modules/cloud/atomic/atomic_container.py b/plugins/modules/cloud/atomic/atomic_container.py index a6be44317b..b7e222842e 100644 --- a/plugins/modules/cloud/atomic/atomic_container.py +++ b/plugins/modules/cloud/atomic/atomic_container.py @@ -88,7 +88,7 @@ msg: description: The command standard output returned: always type: str - sample: [u'Using default tag: latest ...'] + sample: 'Using default tag: latest ...' ''' # import module snippets diff --git a/plugins/modules/cloud/atomic/atomic_image.py b/plugins/modules/cloud/atomic/atomic_image.py index 350ad4c2ae..de1b511e18 100644 --- a/plugins/modules/cloud/atomic/atomic_image.py +++ b/plugins/modules/cloud/atomic/atomic_image.py @@ -64,7 +64,7 @@ msg: description: The command standard output returned: always type: str - sample: [u'Using default tag: latest ...'] + sample: 'Using default tag: latest ...' ''' import traceback diff --git a/plugins/modules/cloud/linode/linode.py b/plugins/modules/cloud/linode/linode.py index 8c29e52a21..761e283e32 100644 --- a/plugins/modules/cloud/linode/linode.py +++ b/plugins/modules/cloud/linode/linode.py @@ -152,7 +152,7 @@ options: description: - Set status of Lassie watchdog. type: bool - default: "True" + default: true requirements: - python >= 2.6 - linode-python diff --git a/plugins/modules/cloud/lxd/lxd_container.py b/plugins/modules/cloud/lxd/lxd_container.py index a9503b657d..1dcb1dee13 100644 --- a/plugins/modules/cloud/lxd/lxd_container.py +++ b/plugins/modules/cloud/lxd/lxd_container.py @@ -393,7 +393,7 @@ actions: description: List of actions performed for the instance. returned: success type: list - sample: '["create", "start"]' + sample: ["create", "start"] ''' import datetime import os diff --git a/plugins/modules/cloud/lxd/lxd_profile.py b/plugins/modules/cloud/lxd/lxd_profile.py index f86f333a37..9f3e2ab81c 100644 --- a/plugins/modules/cloud/lxd/lxd_profile.py +++ b/plugins/modules/cloud/lxd/lxd_profile.py @@ -222,7 +222,7 @@ actions: description: List of actions performed for the profile. returned: success type: list - sample: '["create"]' + sample: ["create"] ''' import os diff --git a/plugins/modules/cloud/misc/rhevm.py b/plugins/modules/cloud/misc/rhevm.py index 77b40248b3..1fbfceb370 100644 --- a/plugins/modules/cloud/misc/rhevm.py +++ b/plugins/modules/cloud/misc/rhevm.py @@ -148,7 +148,7 @@ vm: description: Returns all of the VMs variables and execution. returned: always type: dict - sample: '{ + sample: { "boot_order": [ "hd", "network" @@ -206,7 +206,7 @@ vm: "vmcpu": "4", "vmhost": "host416", "vmmem": "16" - }' + } ''' EXAMPLES = r''' diff --git a/plugins/modules/cloud/oneandone/oneandone_server.py b/plugins/modules/cloud/oneandone/oneandone_server.py index aa651bd75f..375a55a813 100644 --- a/plugins/modules/cloud/oneandone/oneandone_server.py +++ b/plugins/modules/cloud/oneandone/oneandone_server.py @@ -212,7 +212,8 @@ RETURN = ''' servers: description: Information about each server that was processed type: list - sample: '[{"hostname": "my-server", "id": "server-id"}]' + sample: + - {"hostname": "my-server", "id": "server-id"} returned: always ''' diff --git a/plugins/modules/cloud/opennebula/one_service.py b/plugins/modules/cloud/opennebula/one_service.py index 68f8398f36..c6de47a50b 100644 --- a/plugins/modules/cloud/opennebula/one_service.py +++ b/plugins/modules/cloud/opennebula/one_service.py @@ -234,8 +234,9 @@ roles: description: list of dictionaries of roles, each role is described by name, cardinality, state and nodes ids type: list returned: success - sample: '[{"cardinality": 1,"name": "foo","state": "RUNNING","ids": [ 123, 456 ]}, - {"cardinality": 2,"name": "bar","state": "RUNNING", "ids": [ 452, 567, 746 ]}]' + sample: + - {"cardinality": 1,"name": "foo","state": "RUNNING", "ids": [ 123, 456 ]} + - {"cardinality": 2,"name": "bar","state": "RUNNING", "ids": [ 452, 567, 746 ]} ''' import os diff --git a/plugins/modules/cloud/packet/packet_device.py b/plugins/modules/cloud/packet/packet_device.py index abafa51870..a5970c12d7 100644 --- a/plugins/modules/cloud/packet/packet_device.py +++ b/plugins/modules/cloud/packet/packet_device.py @@ -261,10 +261,17 @@ changed: devices: description: Information about each device that was processed type: list - sample: '[{"hostname": "my-server.com", "id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7", - "public_ipv4": "147.229.15.12", "private-ipv4": "10.0.15.12", - "tags": [], "locked": false, "state": "provisioning", - "public_ipv6": ""2604:1380:2:5200::3"}]' + sample: + - { + "hostname": "my-server.com", + "id": "2a5122b9-c323-4d5c-b53c-9ad3f54273e7", + "public_ipv4": "147.229.15.12", + "private-ipv4": "10.0.15.12", + "tags": [], + "locked": false, + "state": "provisioning", + "public_ipv6": "2604:1380:2:5200::3" + } returned: success ''' # NOQA diff --git a/plugins/modules/clustering/consul/consul_acl.py b/plugins/modules/clustering/consul/consul_acl.py index 1e01e58af5..b9dff55d2e 100644 --- a/plugins/modules/clustering/consul/consul_acl.py +++ b/plugins/modules/clustering/consul/consul_acl.py @@ -149,7 +149,7 @@ rules: description: the HCL JSON representation of the rules associated to the ACL, in the format described in the Consul documentation (https://www.consul.io/docs/guides/acl.html#rule-specification). returned: I(status) == "present" - type: str + type: dict sample: { "key": { "foo": { diff --git a/plugins/modules/net_tools/infinity/infinity.py b/plugins/modules/net_tools/infinity/infinity.py index bd12f85af2..950dd228d2 100644 --- a/plugins/modules/net_tools/infinity/infinity.py +++ b/plugins/modules/net_tools/infinity/infinity.py @@ -116,10 +116,17 @@ network_info: description: when reserving a LAN network from a Infinity supernet by providing network_size, the information about the reserved network is returned. returned: success type: str - sample: {"network_address": "192.168.10.32/28","network_family": "4", "network_id": 3102, - "network_size": null,"description": null,"network_location": "3085", - "ranges": { "id": 0, "name": null,"first_ip": null,"type": null,"last_ip": null}, - "network_type": "lan","network_name": "'reserve_new_ansible_network'"} + sample: { + "network_address": "192.168.10.32/28", + "network_family": "4", + "network_id": 3102, + "network_size": null, + "description": null, + "network_location": "3085", + "ranges": { "id": 0, "name": null,"first_ip": null,"type": null,"last_ip": null}, + "network_type": "lan", + "network_name": "'reserve_new_ansible_network'" + } ''' diff --git a/plugins/modules/net_tools/ldap/ldap_attrs.py b/plugins/modules/net_tools/ldap/ldap_attrs.py index c357a83087..fc3b44d36c 100644 --- a/plugins/modules/net_tools/ldap/ldap_attrs.py +++ b/plugins/modules/net_tools/ldap/ldap_attrs.py @@ -160,7 +160,8 @@ modlist: description: list of modified parameters returned: success type: list - sample: '[[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]]' + sample: + - [2, "olcRootDN", ["cn=root,dc=example,dc=com"]] ''' import traceback diff --git a/plugins/modules/net_tools/ldap/ldap_passwd.py b/plugins/modules/net_tools/ldap/ldap_passwd.py index 8d86ee93fc..4cb58b4ebf 100644 --- a/plugins/modules/net_tools/ldap/ldap_passwd.py +++ b/plugins/modules/net_tools/ldap/ldap_passwd.py @@ -58,7 +58,8 @@ modlist: description: list of modified parameters returned: success type: list - sample: '[[2, "olcRootDN", ["cn=root,dc=example,dc=com"]]]' + sample: + - [2, "olcRootDN", ["cn=root,dc=example,dc=com"]] """ import traceback diff --git a/plugins/modules/remote_management/hpilo/hpilo_info.py b/plugins/modules/remote_management/hpilo/hpilo_info.py index b0cc0be940..fb72e32f36 100644 --- a/plugins/modules/remote_management/hpilo/hpilo_info.py +++ b/plugins/modules/remote_management/hpilo/hpilo_info.py @@ -124,7 +124,7 @@ host_power_status: - Will be one of C(ON), C(OFF) and C(UNKNOWN). returned: always type: str - sample: ON + sample: "ON" version_added: 3.5.0 ''' diff --git a/plugins/modules/remote_management/redfish/wdc_redfish_info.py b/plugins/modules/remote_management/redfish/wdc_redfish_info.py index b3596f6ac0..fc223cb5f0 100644 --- a/plugins/modules/remote_management/redfish/wdc_redfish_info.py +++ b/plugins/modules/remote_management/redfish/wdc_redfish_info.py @@ -96,32 +96,22 @@ Description: description: Firmware update status description. returned: always type: str - sample: - - Ready for FW update - - FW update in progress - - FW update completed. Waiting for activation. + sample: Ready for FW update ErrorCode: description: Numeric error code for firmware update status. Non-zero indicates an error condition. returned: always type: int - sample: - - 0 + sample: 0 EstimatedRemainingMinutes: description: Estimated number of minutes remaining in firmware update operation. returned: always type: int - sample: - - 0 - - 20 + sample: 20 StatusCode: description: Firmware update status code. returned: always type: int - sample: - - 0 (Ready for FW update) - - 1 (FW update in progress) - - 2 (FW update completed. Waiting for activation.) - - 3 (FW update failed.) + sample: 2 ''' from ansible.module_utils.basic import AnsibleModule diff --git a/plugins/modules/source_control/github/github_webhook_info.py b/plugins/modules/source_control/github/github_webhook_info.py index 98a7516e75..87fcd33634 100644 --- a/plugins/modules/source_control/github/github_webhook_info.py +++ b/plugins/modules/source_control/github/github_webhook_info.py @@ -73,15 +73,18 @@ hooks: description: A list of hooks that exist for the repo returned: always type: list - sample: > - [{"has_shared_secret": true, - "url": "https://jenkins.example.com/ghprbhook/", - "events": ["issue_comment", "pull_request"], - "insecure_ssl": "1", - "content_type": "json", - "active": true, - "id": 6206, - "last_response": {"status": "active", "message": "OK", "code": 200}}] + elements: dict + sample: + - { + "has_shared_secret": true, + "url": "https://jenkins.example.com/ghprbhook/", + "events": ["issue_comment", "pull_request"], + "insecure_ssl": "1", + "content_type": "json", + "active": true, + "id": 6206, + "last_response": {"status": "active", "message": "OK", "code": 200} + } ''' import traceback diff --git a/plugins/modules/source_control/gitlab/gitlab_group_variable.py b/plugins/modules/source_control/gitlab/gitlab_group_variable.py index 9be3a3ab39..faf8b8a6f5 100644 --- a/plugins/modules/source_control/gitlab/gitlab_group_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_group_variable.py @@ -140,22 +140,22 @@ group_variable: description: A list of variables which were created. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] untouched: description: A list of variables which exist. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] removed: description: A list of variables which were deleted. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] updated: description: A list of variables whose values were changed. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] ''' import traceback diff --git a/plugins/modules/source_control/gitlab/gitlab_project_variable.py b/plugins/modules/source_control/gitlab/gitlab_project_variable.py index f9b8d7b6e1..93dbc5446a 100644 --- a/plugins/modules/source_control/gitlab/gitlab_project_variable.py +++ b/plugins/modules/source_control/gitlab/gitlab_project_variable.py @@ -155,22 +155,22 @@ project_variable: description: A list of variables which were created. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] untouched: description: A list of variables which exist. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] removed: description: A list of variables which were deleted. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] updated: description: A list of variables whose values were changed. returned: always type: list - sample: "['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY']" + sample: ['ACCESS_KEY_ID', 'SECRET_ACCESS_KEY'] ''' import traceback diff --git a/plugins/modules/system/dpkg_divert.py b/plugins/modules/system/dpkg_divert.py index 709d35b865..f44a5a26f2 100644 --- a/plugins/modules/system/dpkg_divert.py +++ b/plugins/modules/system/dpkg_divert.py @@ -114,21 +114,13 @@ commands: type: list returned: on_success elements: str - sample: |- - [ - "/usr/bin/dpkg-divert --no-rename --remove /etc/foobarrc", - "/usr/bin/dpkg-divert --package ansible --no-rename --add /etc/foobarrc" - ] + sample: "/usr/bin/dpkg-divert --no-rename --remove /etc/foobarrc" messages: description: The dpkg-divert relevant messages (stdout or stderr). type: list returned: on_success elements: str - sample: |- - [ - "Removing 'local diversion of /etc/foobarrc to /etc/foobarrc.distrib'", - "Adding 'diversion of /etc/foobarrc to /etc/foobarrc.distrib by ansible'" - ] + sample: "Removing 'local diversion of /etc/foobarrc to /etc/foobarrc.distrib'" diversion: description: The status of the diversion after task execution. type: dict @@ -146,11 +138,11 @@ diversion: state: description: The state of the diversion. type: str - sample: |- + sample: { "divert": "/etc/foobarrc.distrib", "holder": "LOCAL", - "path": "/etc/foobarrc" + "path": "/etc/foobarrc", "state": "present" } ''' diff --git a/plugins/modules/system/nosh.py b/plugins/modules/system/nosh.py index dbaf7ea59f..634e323111 100644 --- a/plugins/modules/system/nosh.py +++ b/plugins/modules/system/nosh.py @@ -147,7 +147,7 @@ status: description: [] # FIXME returned: success type: list - sample: '[]' + sample: [] DaemontoolsEncoreState: description: [] # FIXME returned: success @@ -192,7 +192,7 @@ status: description: [] # FIXME returned: success type: list - sample: '[]' + sample: [] RestartExitStatusCode: description: [] # FIXME returned: success diff --git a/plugins/modules/system/pamd.py b/plugins/modules/system/pamd.py index dda504974d..4a58da74f7 100644 --- a/plugins/modules/system/pamd.py +++ b/plugins/modules/system/pamd.py @@ -226,34 +226,6 @@ change_count: type: int sample: 1 returned: success -new_rule: - description: The changes to the rule. This was available in Ansible 2.4 and Ansible 2.5. It was removed in Ansible 2.6. - type: str - sample: None None None sha512 shadow try_first_pass use_authtok - returned: success -updated_rule_(n): - description: The rule(s) that was/were changed. This is only available in - Ansible 2.4 and was removed in Ansible 2.5. - type: str - sample: - - password sufficient pam_unix.so sha512 shadow try_first_pass - use_authtok - returned: success -action: - description: - - "That action that was taken and is one of: update_rule, - insert_before_rule, insert_after_rule, args_present, args_absent, - absent. This was available in Ansible 2.4 and removed in Ansible 2.8" - returned: always - type: str - sample: "update_rule" -dest: - description: - - "Path to pam.d service that was changed. This is only available in - Ansible 2.3 and was removed in Ansible 2.4." - returned: success - type: str - sample: "/etc/pam.d/system-auth" backupdest: description: - "The file name of the backup file, if created." diff --git a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py index 4c0abb0608..2944a6bd57 100644 --- a/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py +++ b/plugins/modules/web_infrastructure/sophos_utm/utm_proxy_location.py @@ -41,7 +41,8 @@ options: - A list of allowed networks type: list elements: str - default: REF_NetworkAny + default: + - REF_NetworkAny auth_profile: type: str description: