From 1d0a629dcc87c49bf2b97a8922629f2e8952c911 Mon Sep 17 00:00:00 2001 From: Andrea Tartaglia Date: Thu, 27 Apr 2017 12:01:11 +0100 Subject: [PATCH] Fixed docs for cloud modules (#23745) * Fixed docs for cloud modules * removed blank line in ec2_snapshot_facts --- .../modules/cloud/amazon/cloudformation.py | 3 +- .../cloud/amazon/cloudformation_facts.py | 4 +- lib/ansible/modules/cloud/amazon/ec2_ami.py | 4 +- .../modules/cloud/amazon/ec2_ami_find.py | 4 +- lib/ansible/modules/cloud/amazon/ec2_eni.py | 2 +- .../modules/cloud/amazon/ec2_group_facts.py | 1 + .../modules/cloud/amazon/ec2_lc_facts.py | 16 ++- .../modules/cloud/amazon/ec2_lc_find.py | 2 +- .../cloud/amazon/ec2_snapshot_facts.py | 32 ++++-- .../cloud/amazon/ec2_vpc_nacl_facts.py | 2 +- .../modules/cloud/amazon/ecs_cluster.py | 7 +- lib/ansible/modules/cloud/amazon/ecs_ecr.py | 2 + .../modules/cloud/amazon/ecs_service_facts.py | 2 +- .../cloud/amazon/ecs_taskdefinition.py | 3 +- lib/ansible/modules/cloud/amazon/efs.py | 56 +++++------ lib/ansible/modules/cloud/amazon/efs_facts.py | 34 +++---- .../modules/cloud/amazon/execute_lambda.py | 2 + lib/ansible/modules/cloud/amazon/iam_role.py | 7 ++ lib/ansible/modules/cloud/amazon/redshift.py | 2 +- .../cloud/amazon/redshift_subnet_group.py | 2 +- .../modules/cloud/amazon/s3_website.py | 83 +++++++++------- lib/ansible/modules/cloud/amazon/sns_topic.py | 2 + lib/ansible/modules/cloud/amazon/sqs_queue.py | 8 ++ .../cloud/azure/azure_rm_resourcegroup.py | 1 + .../cloud/azure/azure_rm_virtualmachine.py | 2 +- .../cloud/cloudstack/cs_portforward.py | 2 - .../dimensiondata/dimensiondata_network.py | 2 +- .../modules/cloud/docker/docker_image.py | 2 +- .../modules/cloud/docker/docker_network.py | 2 +- lib/ansible/modules/cloud/google/gce_mig.py | 2 +- .../cloud/google/gcp_backend_service.py | 2 +- lib/ansible/modules/cloud/google/gcpubsub.py | 4 +- .../modules/cloud/lxc/lxc_container.py | 2 +- .../modules/cloud/lxd/lxd_container.py | 2 +- .../cloud/openstack/os_flavor_facts.py | 2 +- .../modules/cloud/openstack/os_group.py | 2 +- .../cloud/openstack/os_ironic_inspect.py | 2 +- .../cloud/openstack/os_keystone_domain.py | 2 +- .../cloud/openstack/os_keystone_role.py | 2 +- .../cloud/openstack/os_keystone_service.py | 2 +- .../modules/cloud/openstack/os_network.py | 2 +- .../modules/cloud/openstack/os_nova_flavor.py | 2 +- .../modules/cloud/openstack/os_port.py | 6 +- .../modules/cloud/openstack/os_project.py | 2 +- .../modules/cloud/openstack/os_quota.py | 82 ++++++++-------- .../modules/cloud/openstack/os_recordset.py | 2 +- .../modules/cloud/openstack/os_router.py | 2 +- .../cloud/openstack/os_security_group_rule.py | 8 ++ .../cloud/openstack/os_server_group.py | 4 +- .../modules/cloud/openstack/os_stack.py | 97 ++++++++++--------- .../modules/cloud/openstack/os_user.py | 2 +- .../modules/cloud/openstack/os_zone.py | 2 +- .../cloud/ovirt/ovirt_affinity_groups.py | 1 + .../cloud/ovirt/ovirt_affinity_labels.py | 1 + lib/ansible/modules/cloud/ovirt/ovirt_auth.py | 2 +- .../modules/cloud/ovirt/ovirt_clusters.py | 1 + .../modules/cloud/ovirt/ovirt_datacenters.py | 1 + .../modules/cloud/ovirt/ovirt_disks.py | 2 + .../modules/cloud/ovirt/ovirt_groups.py | 1 + .../cloud/ovirt/ovirt_host_networks.py | 1 + .../modules/cloud/ovirt/ovirt_host_pm.py | 1 + .../modules/cloud/ovirt/ovirt_hosts.py | 1 + .../modules/cloud/ovirt/ovirt_mac_pools.py | 1 + .../modules/cloud/ovirt/ovirt_networks.py | 1 + lib/ansible/modules/cloud/ovirt/ovirt_nics.py | 1 + .../modules/cloud/ovirt/ovirt_permissions.py | 1 + .../modules/cloud/ovirt/ovirt_quotas.py | 1 + .../modules/cloud/ovirt/ovirt_snapshots.py | 1 + .../cloud/ovirt/ovirt_storage_domains.py | 1 + lib/ansible/modules/cloud/ovirt/ovirt_tags.py | 1 + .../modules/cloud/ovirt/ovirt_templates.py | 1 + .../modules/cloud/ovirt/ovirt_users.py | 1 + .../modules/cloud/ovirt/ovirt_vmpools.py | 1 + lib/ansible/modules/cloud/ovirt/ovirt_vms.py | 1 + .../modules/cloud/packet/packet_device.py | 2 +- .../modules/cloud/packet/packet_sshkey.py | 2 +- .../modules/cloud/pubnub/pubnub_blocks.py | 1 + .../modules/cloud/vmware/vmware_guest.py | 2 +- .../cloud/vmware/vmware_guest_snapshot.py | 2 +- .../cloud/vmware/vmware_maintenancemode.py | 2 +- .../cloud/vmware/vmware_resource_pool.py | 2 +- .../modules/cloud/vmware/vmware_vmotion.py | 4 +- 82 files changed, 335 insertions(+), 232 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/cloudformation.py b/lib/ansible/modules/cloud/amazon/cloudformation.py index 529ac575c3..6f8a6e2984 100644 --- a/lib/ansible/modules/cloud/amazon/cloudformation.py +++ b/lib/ansible/modules/cloud/amazon/cloudformation.py @@ -204,6 +204,7 @@ log: sample: ["updating stack"] stack_resources: description: AWS stack resources and their status. List of dictionaries, one dict per resource. + returned: state == present type: list sample: [ { @@ -218,7 +219,7 @@ stack_resources: stack_outputs: type: dict description: A key:value dictionary of all the stack outputs currently defined. If there are no stack outputs, it is an empty dictionary. - returned: always + returned: state == present sample: {"MySg": "AnsibleModuleTestYAML-CFTestSg-C8UVS567B6NS"} ''' # NOQA diff --git a/lib/ansible/modules/cloud/amazon/cloudformation_facts.py b/lib/ansible/modules/cloud/amazon/cloudformation_facts.py index c8c9d47fb1..49183ced0c 100644 --- a/lib/ansible/modules/cloud/amazon/cloudformation_facts.py +++ b/lib/ansible/modules/cloud/amazon/cloudformation_facts.py @@ -124,7 +124,7 @@ stack_parameters: stack_events: description: All stack events for the stack returned: only if all_facts or stack_events is true - type: list of events + type: list stack_policy: description: Describes the stack policy for the stack returned: only if all_facts or stack_policy is true @@ -136,7 +136,7 @@ stack_template: stack_resource_list: description: Describes stack resources for the stack returned: only if all_facts or stack_resourses is true - type: list of resources + type: list stack_resources: description: Dictionary of stack resources keyed by the value of each resource 'LogicalResourceId' parameter and corresponding value of each resource 'PhysicalResourceId' parameter diff --git a/lib/ansible/modules/cloud/amazon/ec2_ami.py b/lib/ansible/modules/cloud/amazon/ec2_ami.py index 2a3812ddf5..c8bcf393ee 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_ami.py +++ b/lib/ansible/modules/cloud/amazon/ec2_ami.py @@ -256,7 +256,7 @@ architecture: block_device_mapping: description: block device mapping associated with image returned: when AMI is created or already exists - type: a dictionary of block devices + type: dict sample: { "/dev/sda1": { "delete_on_termination": true, @@ -329,7 +329,7 @@ state: tags: description: a dictionary of tags assigned to image returned: when AMI is created or already exists - type: dictionary of tags + type: dict sample: { "Env": "devel", "Name": "nat-server" diff --git a/lib/ansible/modules/cloud/amazon/ec2_ami_find.py b/lib/ansible/modules/cloud/amazon/ec2_ami_find.py index 5af26d0e77..3da5313929 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_ami_find.py +++ b/lib/ansible/modules/cloud/amazon/ec2_ami_find.py @@ -213,7 +213,7 @@ architecture: block_device_mapping: description: block device mapping associated with image returned: when AMI found - type: dictionary of block devices + type: dict sample: "{ '/dev/xvda': { 'delete_on_termination': true, @@ -280,7 +280,7 @@ state: tags: description: tags assigned to image returned: when AMI found - type: dictionary of tags + type: dict sample: "{ 'Environment': 'devel', 'Name': 'test-server01', diff --git a/lib/ansible/modules/cloud/amazon/ec2_eni.py b/lib/ansible/modules/cloud/amazon/ec2_eni.py index 37dde52d25..3930980728 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_eni.py +++ b/lib/ansible/modules/cloud/amazon/ec2_eni.py @@ -190,7 +190,7 @@ RETURN = ''' interface: description: Network interface attributes returned: when state != absent - type: dictionary + type: complex contains: description: description: interface description diff --git a/lib/ansible/modules/cloud/amazon/ec2_group_facts.py b/lib/ansible/modules/cloud/amazon/ec2_group_facts.py index 4f1c68c0e4..0cc554370d 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_group_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_group_facts.py @@ -94,6 +94,7 @@ RETURN = ''' security_groups: description: Security groups that match the provided filters. Each element consists of a dict with all the information related to that security group. type: list + returned: always sample: ''' diff --git a/lib/ansible/modules/cloud/amazon/ec2_lc_facts.py b/lib/ansible/modules/cloud/amazon/ec2_lc_facts.py index 31faa519da..d42f2b2b4a 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_lc_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_lc_facts.py @@ -83,7 +83,8 @@ EXAMPLES = ''' RETURN = ''' block_device_mapping: description: Block device mapping for the instances of launch configuration - type: list of block devices + type: list + returned: always sample: "[{ 'device_name': '/dev/xvda':, 'ebs': { @@ -94,58 +95,71 @@ block_device_mapping: classic_link_vpc_security_groups: description: IDs of one or more security groups for the VPC specified in classic_link_vpc_id type: string + returned: always sample: created_time: description: The creation date and time for the launch configuration type: string + returned: always sample: "2016-05-27T13:47:44.216000+00:00" ebs_optimized: description: EBS I/O optimized (true ) or not (false ) type: bool + returned: always sample: true, image_id: description: ID of the Amazon Machine Image (AMI) type: string + returned: always sample: "ami-12345678" instance_monitoring: description: Launched with detailed monitoring or not type: dict + returned: always sample: "{ 'enabled': true }" instance_type: description: Instance type type: string + returned: always sample: "t2.micro" kernel_id: description: ID of the kernel associated with the AMI type: string + returned: always sample: key_name: description: Name of the key pair type: string + returned: always sample: "user_app" launch_configuration_arn: description: Amazon Resource Name (ARN) of the launch configuration type: string + returned: always sample: "arn:aws:autoscaling:us-east-1:666612345678:launchConfiguration:ba785e3a-dd42-6f02-4585-ea1a2b458b3d:launchConfigurationName/lc-app" launch_configuration_name: description: Name of the launch configuration type: string + returned: always sample: "lc-app" ramdisk_id: description: ID of the RAM disk associated with the AMI type: string + returned: always sample: security_groups: description: Security groups to associated type: list + returned: always sample: "[ 'web' ]" user_data: description: User data available type: string + returned: always sample: ''' diff --git a/lib/ansible/modules/cloud/amazon/ec2_lc_find.py b/lib/ansible/modules/cloud/amazon/ec2_lc_find.py index ac22989041..21d5e3013d 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_lc_find.py +++ b/lib/ansible/modules/cloud/amazon/ec2_lc_find.py @@ -83,7 +83,7 @@ user_data: description: User data used to start instance returned: when Launch Configuration was found type: string - user_data: "ZXhwb3J0IENMT1VE" + sample: "ZXhwb3J0IENMT1VE" name: description: Name of the AMI returned: when Launch Configuration was found diff --git a/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py b/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py index 1aa80e2d5b..bae339629e 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_snapshot_facts.py @@ -103,62 +103,76 @@ RETURN = ''' snapshot_id: description: The ID of the snapshot. Each snapshot receives a unique identifier when it is created. type: string + returned: always sample: snap-01234567 volume_id: description: The ID of the volume that was used to create the snapshot. type: string + returned: always sample: vol-01234567 state: description: The snapshot state (completed, pending or error). type: string + returned: always sample: completed state_message: description: Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. type: string + returned: always sample: start_time: description: The time stamp when the snapshot was initiated. - type: datetime - sample: 2015-02-12T02:14:02+00:00 + type: string + returned: always + sample: "2015-02-12T02:14:02+00:00" progress: description: The progress of the snapshot, as a percentage. type: string - sample: 100% + returned: always + sample: "100%" owner_id: description: The AWS account ID of the EBS snapshot owner. type: string - sample: 099720109477 + returned: always + sample: "099720109477" description: description: The description for the snapshot. type: string - sample: My important backup + returned: always + sample: "My important backup" volume_size: description: The size of the volume, in GiB. - type: integer + type: int + returned: always sample: 8 owner_alias: description: The AWS account alias (for example, amazon, self) or AWS account ID that owns the snapshot. type: string - sample: 033440102211 + returned: always + sample: "033440102211" tags: description: Any tags assigned to the snapshot. type: dict + returned: always sample: "{ 'my_tag_key': 'my_tag_value' }" encrypted: description: Indicates whether the snapshot is encrypted. type: boolean - sample: True + returned: always + sample: "True" kms_key_id: description: The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to \ protect the volume encryption key for the parent volume. type: string - sample: 74c9742a-a1b2-45cb-b3fe-abcdef123456 + returned: always + sample: "74c9742a-a1b2-45cb-b3fe-abcdef123456" data_encryption_key_id: description: The data encryption key identifier for the snapshot. This value is a unique identifier that \ corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. type: string + returned: always sample: "arn:aws:kms:ap-southeast-2:012345678900:key/74c9742a-a1b2-45cb-b3fe-abcdef123456" ''' diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_facts.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_facts.py index d103f4a605..ab0a0c9eb3 100644 --- a/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_facts.py +++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_nacl_facts.py @@ -71,7 +71,7 @@ RETURN = ''' nacl: description: Returns an array of complex objects as described below. returned: success - type: list of complex + type: complex contains: nacl_id: description: The ID of the Network Access Control List. diff --git a/lib/ansible/modules/cloud/amazon/ecs_cluster.py b/lib/ansible/modules/cloud/amazon/ecs_cluster.py index 81710f108a..d66413b925 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_cluster.py +++ b/lib/ansible/modules/cloud/amazon/ecs_cluster.py @@ -83,11 +83,13 @@ activeServicesCount: type: int clusterArn: description: the ARN of the cluster just created - type: string (ARN) + type: string + returned: 0 if a new cluster sample: arn:aws:ecs:us-west-2:172139249013:cluster/test-cluster-mfshcdok clusterName: description: name of the cluster just created (should match the input argument) type: string + returned: always sample: test-cluster-mfshcdok pendingTasksCount: description: how many tasks are waiting to run in this cluster @@ -103,8 +105,9 @@ runningTasksCount: type: int status: description: the status of the new cluster - returned: ACTIVE + returned: always type: string + sample: ACTIVE ''' import time diff --git a/lib/ansible/modules/cloud/amazon/ecs_ecr.py b/lib/ansible/modules/cloud/amazon/ecs_ecr.py index e41a4406ae..b322fd757f 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_ecr.py +++ b/lib/ansible/modules/cloud/amazon/ecs_ecr.py @@ -104,9 +104,11 @@ RETURN = ''' state: type: string description: The asserted state of the repository (present, absent) + returned: always created: type: boolean description: If true, the repository was created + returned: always name: type: string description: The name of the repository diff --git a/lib/ansible/modules/cloud/amazon/ecs_service_facts.py b/lib/ansible/modules/cloud/amazon/ecs_service_facts.py index c3c08ed3bc..fa56b325ac 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_service_facts.py +++ b/lib/ansible/modules/cloud/amazon/ecs_service_facts.py @@ -71,7 +71,7 @@ RETURN = ''' services: description: When details is false, returns an array of service ARNs, otherwise an array of complex objects as described below. returned: success - type: list of complex + type: complex contains: clusterArn: description: The Amazon Resource Name (ARN) of the of the cluster that hosts the service. diff --git a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py index 89b79f3d55..9dea5af1c6 100644 --- a/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py +++ b/lib/ansible/modules/cloud/amazon/ecs_taskdefinition.py @@ -111,7 +111,8 @@ EXAMPLES = ''' RETURN = ''' taskdefinition: description: a reflection of the input parameters - type: dict inputs plus revision, status, taskDefinitionArn + type: dict + returned: always ''' try: import boto diff --git a/lib/ansible/modules/cloud/amazon/efs.py b/lib/ansible/modules/cloud/amazon/efs.py index c86ccd2690..6765e555a8 100644 --- a/lib/ansible/modules/cloud/amazon/efs.py +++ b/lib/ansible/modules/cloud/amazon/efs.py @@ -115,33 +115,33 @@ EXAMPLES = ''' RETURN = ''' creation_time: description: timestamp of creation date - returned: - type: datetime - sample: 2015-11-16 07:30:57-05:00 + returned: always + type: string + sample: "2015-11-16 07:30:57-05:00" creation_token: description: EFS creation token - returned: - type: UUID - sample: console-88609e04-9a0e-4a2e-912c-feaa99509961 + returned: always + type: string + sample: "console-88609e04-9a0e-4a2e-912c-feaa99509961" file_system_id: description: ID of the file system - returned: - type: unique ID - sample: fs-xxxxxxxx + returned: always + type: string + sample: "fs-xxxxxxxx" life_cycle_state: description: state of the EFS file system - returned: - type: str - sample: creating, available, deleting, deleted + returned: always + type: string + sample: "creating, available, deleting, deleted" mount_point: description: url of file system - returned: - type: str - sample: .fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/ + returned: always + type: string + sample: ".fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/" mount_targets: description: list of mount targets - returned: - type: list of dicts + returned: always + type: list sample: [ { @@ -160,22 +160,22 @@ mount_targets: ] name: description: name of the file system - returned: - type: str - sample: my-efs + returned: always + type: string + sample: "my-efs" number_of_mount_targets: description: the number of targets mounted - returned: + returned: always type: int sample: 3 owner_id: description: AWS account ID of EFS owner - returned: - type: str - sample: XXXXXXXXXXXX + returned: always + type: string + sample: "XXXXXXXXXXXX" size_in_bytes: description: size of the file system in bytes as of a timestamp - returned: + returned: always type: dict sample: { @@ -184,12 +184,12 @@ size_in_bytes: } performance_mode: description: performance mode of the file system - returned: - type: str + returned: always + type: string sample: "generalPurpose" tags: description: tags on the efs instance - returned: + returned: always type: dict sample: { diff --git a/lib/ansible/modules/cloud/amazon/efs_facts.py b/lib/ansible/modules/cloud/amazon/efs_facts.py index b9b728bb2d..9f50e44c5b 100644 --- a/lib/ansible/modules/cloud/amazon/efs_facts.py +++ b/lib/ansible/modules/cloud/amazon/efs_facts.py @@ -80,33 +80,33 @@ EXAMPLES = ''' RETURN = ''' creation_time: description: timestamp of creation date - returned: - type: datetime - sample: 2015-11-16 07:30:57-05:00 + returned: always + type: str + sample: "2015-11-16 07:30:57-05:00" creation_token: description: EFS creation token - returned: - type: UUID + returned: always + type: str sample: console-88609e04-9a0e-4a2e-912c-feaa99509961 file_system_id: description: ID of the file system - returned: - type: unique ID + returned: always + type: str sample: fs-xxxxxxxx life_cycle_state: description: state of the EFS file system - returned: + returned: always type: str sample: creating, available, deleting, deleted mount_point: description: url of file system - returned: + returned: always type: str sample: .fs-xxxxxxxx.efs.us-west-2.amazonaws.com:/ mount_targets: description: list of mount targets - returned: - type: list of dicts + returned: always + type: list sample: [ { @@ -125,22 +125,22 @@ mount_targets: ] name: description: name of the file system - returned: + returned: always type: str sample: my-efs number_of_mount_targets: description: the number of targets mounted - returned: + returned: always type: int sample: 3 owner_id: description: AWS account ID of EFS owner - returned: + returned: always type: str sample: XXXXXXXXXXXX size_in_bytes: description: size of the file system in bytes as of a timestamp - returned: + returned: always type: dict sample: { @@ -149,12 +149,12 @@ size_in_bytes: } performance_mode: description: performance mode of the file system - returned: + returned: always type: str sample: "generalPurpose" tags: description: tags on the efs instance - returned: + returned: always type: dict sample: { diff --git a/lib/ansible/modules/cloud/amazon/execute_lambda.py b/lib/ansible/modules/cloud/amazon/execute_lambda.py index c3cd141dc9..3645f95eec 100644 --- a/lib/ansible/modules/cloud/amazon/execute_lambda.py +++ b/lib/ansible/modules/cloud/amazon/execute_lambda.py @@ -127,10 +127,12 @@ output: logs: description: The last 4KB of the function logs. Only provided if I(tail_log) is true type: string + returned: if I(tail_log) == true status: description: C(StatusCode) of API call exit (200 for synchronous invokes, 202 for async) type: int sample: 200 + returned: always ''' import base64 diff --git a/lib/ansible/modules/cloud/amazon/iam_role.py b/lib/ansible/modules/cloud/amazon/iam_role.py index 94238233e9..a1b8ea0739 100644 --- a/lib/ansible/modules/cloud/amazon/iam_role.py +++ b/lib/ansible/modules/cloud/amazon/iam_role.py @@ -92,26 +92,32 @@ RETURN = ''' path: description: the path to the role type: string + returned: always sample: / role_name: description: the friendly name that identifies the role type: string + returned: always sample: myrole role_id: description: the stable and unique string identifying the role type: string + returned: always sample: ABCDEFF4EZ4ABCDEFV4ZC arn: description: the Amazon Resource Name (ARN) specifying the role type: string + returned: always sample: "arn:aws:iam::1234567890:role/mynewrole" create_date: description: the date and time, in ISO 8601 date-time format, when the role was created type: string + returned: always sample: "2016-08-14T04:36:28+00:00" assume_role_policy_document: description: the policy that grants an entity permission to assume the role type: string + returned: always sample: { 'statement': [ { @@ -128,6 +134,7 @@ assume_role_policy_document: attached_policies: description: a list of dicts containing the name and ARN of the managed IAM policies attached to the role type: list + returned: always sample: [ { 'policy_arn': 'arn:aws:iam::aws:policy/PowerUserAccess', diff --git a/lib/ansible/modules/cloud/amazon/redshift.py b/lib/ansible/modules/cloud/amazon/redshift.py index 7bc4ea1f33..3d42681d7f 100644 --- a/lib/ansible/modules/cloud/amazon/redshift.py +++ b/lib/ansible/modules/cloud/amazon/redshift.py @@ -155,7 +155,7 @@ RETURN = ''' cluster: description: dictionary containing all the cluster information returned: success - type: dictionary + type: complex contains: identifier: description: Id of the cluster. diff --git a/lib/ansible/modules/cloud/amazon/redshift_subnet_group.py b/lib/ansible/modules/cloud/amazon/redshift_subnet_group.py index 541aea336c..83c58aab2c 100644 --- a/lib/ansible/modules/cloud/amazon/redshift_subnet_group.py +++ b/lib/ansible/modules/cloud/amazon/redshift_subnet_group.py @@ -77,7 +77,7 @@ RETURN = ''' group: description: dictionary containing all Redshift subnet group information returned: success - type: dictionary + type: complex contains: name: description: name of the Redshift subnet group diff --git a/lib/ansible/modules/cloud/amazon/s3_website.py b/lib/ansible/modules/cloud/amazon/s3_website.py index 0cf8523865..a4ca543573 100644 --- a/lib/ansible/modules/cloud/amazon/s3_website.py +++ b/lib/ansible/modules/cloud/amazon/s3_website.py @@ -95,44 +95,59 @@ EXAMPLES = ''' RETURN = ''' index_document: - suffix: - description: suffix that is appended to a request that is for a directory on the website endpoint - returned: success - type: string - sample: index.html + description: index document + type: complex + returned: always + contains: + suffix: + description: suffix that is appended to a request that is for a directory on the website endpoint + returned: success + type: string + sample: index.html error_document: - key: - description: object key name to use when a 4XX class error occurs - returned: when error_document parameter set - type: string - sample: error.html + description: error document + type: complex + returned: always + contains: + key: + description: object key name to use when a 4XX class error occurs + returned: when error_document parameter set + type: string + sample: error.html redirect_all_requests_to: - host_name: - description: name of the host where requests will be redirected. - returned: when redirect all requests parameter set - type: string - sample: ansible.com + description: where to redirect requests + type: complex + returned: always + contains: + host_name: + description: name of the host where requests will be redirected. + returned: when redirect all requests parameter set + type: string + sample: ansible.com routing_rules: - routing_rule: - host_name: - description: name of the host where requests will be redirected. - returned: when host name set as part of redirect rule - type: string - sample: ansible.com - condition: - key_prefix_equals: - description: object key name prefix when the redirect is applied. For example, to redirect requests for ExamplePage.html, the key prefix will be + description: routing rules + type: complex + returned: always + contains: + routing_rule: + host_name: + description: name of the host where requests will be redirected. + returned: when host name set as part of redirect rule + type: string + sample: ansible.com + condition: + key_prefix_equals: + description: object key name prefix when the redirect is applied. For example, to redirect requests for ExamplePage.html, the key prefix will be ExamplePage.html - returned: when routing rule present - type: string - sample: docs/ - redirect: - replace_key_prefix_with: - description: object key prefix to use in the redirect request - returned: when routing rule present - type: string - sample: documents/ - + returned: when routing rule present + type: string + sample: docs/ + redirect: + replace_key_prefix_with: + description: object key prefix to use in the redirect request + returned: when routing rule present + type: string + sample: documents/ ''' import time diff --git a/lib/ansible/modules/cloud/amazon/sns_topic.py b/lib/ansible/modules/cloud/amazon/sns_topic.py index 60ef69c4d0..0a00e90c0b 100644 --- a/lib/ansible/modules/cloud/amazon/sns_topic.py +++ b/lib/ansible/modules/cloud/amazon/sns_topic.py @@ -105,11 +105,13 @@ RETURN = ''' sns_arn: description: The ARN of the topic you are modifying type: string + returned: always sample: "arn:aws:sns:us-east-1:123456789012:my_topic_name" sns_topic: description: Dict of sns topic details type: dict + returned: always sample: name: sns-topic-name state: present diff --git a/lib/ansible/modules/cloud/amazon/sqs_queue.py b/lib/ansible/modules/cloud/amazon/sqs_queue.py index 75f87ef8bf..d23d575f7c 100644 --- a/lib/ansible/modules/cloud/amazon/sqs_queue.py +++ b/lib/ansible/modules/cloud/amazon/sqs_queue.py @@ -89,34 +89,42 @@ extends_documentation_fragment: RETURN = ''' default_visibility_timeout: description: The default visibility timeout in seconds. + type: int returned: always sample: 30 delivery_delay: description: The delivery delay in seconds. + type: int returned: always sample: 0 maximum_message_size: description: The maximum message size in bytes. + type: int returned: always sample: 262144 message_retention_period: description: The message retention period in seconds. + type: int returned: always sample: 345600 name: description: Name of the SQS Queue + type: string returned: always sample: "queuename-987d2de0" queue_arn: description: The queue's Amazon resource name (ARN). + type: string returned: on successful creation or update of the queue sample: 'arn:aws:sqs:us-east-1:199999999999:queuename-987d2de0' receive_message_wait_time: description: The receive message wait time in seconds. + type: int returned: always sample: 0 region: description: Region that the queue was created within + type: string returned: always sample: 'us-east-1' ''' diff --git a/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py b/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py index 64330847fc..831cfdda40 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py @@ -85,6 +85,7 @@ EXAMPLES = ''' RETURN = ''' contains_resources: description: Whether or not the resource group contains associated resources. + returned: always type: bool sample: True state: diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py index a721d45097..04711a473f 100644 --- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py +++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine.py @@ -314,7 +314,7 @@ azure_vm: description: Facts about the current state of the object. Note that facts are not part of the registered output but available directly. returned: always type: complex - example: { + contains: { "properties": { "hardwareProfile": { "vmSize": "Standard_D1" diff --git a/lib/ansible/modules/cloud/cloudstack/cs_portforward.py b/lib/ansible/modules/cloud/cloudstack/cs_portforward.py index 8685498ebb..1d3754e566 100644 --- a/lib/ansible/modules/cloud/cloudstack/cs_portforward.py +++ b/lib/ansible/modules/cloud/cloudstack/cs_portforward.py @@ -228,13 +228,11 @@ vm_guest_ip: sample: 10.101.65.152 vpc: description: Name of the VPC. - version_added: "2.3" returned: success type: string sample: my_vpc network: description: Name of the network. - version_added: "2.3" returned: success type: string sample: dmz diff --git a/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py b/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py index f15ef824a5..334246fde8 100644 --- a/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py +++ b/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py @@ -86,7 +86,7 @@ RETURN = ''' network: description: Dictionary describing the network. returned: On success when I(state=present). - type: dictionary + type: complex contains: id: description: Network ID. diff --git a/lib/ansible/modules/cloud/docker/docker_image.py b/lib/ansible/modules/cloud/docker/docker_image.py index 97ba9b9b90..d8e39992d4 100644 --- a/lib/ansible/modules/cloud/docker/docker_image.py +++ b/lib/ansible/modules/cloud/docker/docker_image.py @@ -242,7 +242,7 @@ RETURN = ''' image: description: Image inspection results for the affected image. returned: success - type: complex + type: dict sample: {} ''' diff --git a/lib/ansible/modules/cloud/docker/docker_network.py b/lib/ansible/modules/cloud/docker/docker_network.py index c7a15cc98b..dbffee5ba6 100644 --- a/lib/ansible/modules/cloud/docker/docker_network.py +++ b/lib/ansible/modules/cloud/docker/docker_network.py @@ -157,7 +157,7 @@ RETURN = ''' facts: description: Network inspection results for the affected network. returned: success - type: complex + type: dict sample: {} ''' diff --git a/lib/ansible/modules/cloud/google/gce_mig.py b/lib/ansible/modules/cloud/google/gce_mig.py index 683cf703c6..683d5a42cb 100644 --- a/lib/ansible/modules/cloud/google/gce_mig.py +++ b/lib/ansible/modules/cloud/google/gce_mig.py @@ -206,7 +206,7 @@ named_ports: size: description: Number of VMs in Managed Instance Group. returned: changed - type: integer + type: int sample: 4 created_instances: diff --git a/lib/ansible/modules/cloud/google/gcp_backend_service.py b/lib/ansible/modules/cloud/google/gcp_backend_service.py index 99fe87791a..bd3fc85f7e 100644 --- a/lib/ansible/modules/cloud/google/gcp_backend_service.py +++ b/lib/ansible/modules/cloud/google/gcp_backend_service.py @@ -176,7 +176,7 @@ timeout: description: In seconds, how long before a request sent to a backend is considered failed. returned: If specified. - type: integer + type: int sample: "myhttpport" ''' diff --git a/lib/ansible/modules/cloud/google/gcpubsub.py b/lib/ansible/modules/cloud/google/gcpubsub.py index 41e0a78736..4c46300346 100644 --- a/lib/ansible/modules/cloud/google/gcpubsub.py +++ b/lib/ansible/modules/cloud/google/gcpubsub.py @@ -159,13 +159,13 @@ publish: description: List of dictionaries describing messages and attributes to be published. Dictionary is in message(str):attributes(dict) format. Only message is required. returned: Only when specified - type: list of dictionary + type: list sample: "publish: ['message': 'my message', attributes: {'key1': 'value1'}]" pulled_messages: description: list of dictionaries containing message info. Fields are ack_id, attributes, data, message_id. returned: Only when subscription.pull is specified - type: list of dictionary + type: list sample: [{ "ack_id": "XkASTCcYREl...","attributes": {"key1": "val1",...}, "data": "this is message 1", "message_id": "49107464153705"},..] state: diff --git a/lib/ansible/modules/cloud/lxc/lxc_container.py b/lib/ansible/modules/cloud/lxc/lxc_container.py index 3d437275d3..591278167d 100644 --- a/lib/ansible/modules/cloud/lxc/lxc_container.py +++ b/lib/ansible/modules/cloud/lxc/lxc_container.py @@ -392,7 +392,7 @@ RETURN=""" lxc_container: description: container information returned: success - type: list + type: complex contains: name: description: name of the lxc container diff --git a/lib/ansible/modules/cloud/lxd/lxd_container.py b/lib/ansible/modules/cloud/lxd/lxd_container.py index e35284dd62..4c182239f3 100644 --- a/lib/ansible/modules/cloud/lxd/lxd_container.py +++ b/lib/ansible/modules/cloud/lxd/lxd_container.py @@ -231,7 +231,7 @@ RETURN=''' addresses: description: Mapping from the network device name to a list of IPv4 addresses in the container returned: when state is started or restarted - type: object + type: dict sample: {"eth0": ["10.155.92.191"]} old_state: description: The old state of the container diff --git a/lib/ansible/modules/cloud/openstack/os_flavor_facts.py b/lib/ansible/modules/cloud/openstack/os_flavor_facts.py index d924bc0f63..249f4018ee 100644 --- a/lib/ansible/modules/cloud/openstack/os_flavor_facts.py +++ b/lib/ansible/modules/cloud/openstack/os_flavor_facts.py @@ -135,7 +135,7 @@ RETURN = ''' openstack_flavors: description: Dictionary describing the flavors. returned: On success. - type: dictionary + type: complex contains: id: description: Flavor ID. diff --git a/lib/ansible/modules/cloud/openstack/os_group.py b/lib/ansible/modules/cloud/openstack/os_group.py index e9551587c5..d6a3ca93b5 100644 --- a/lib/ansible/modules/cloud/openstack/os_group.py +++ b/lib/ansible/modules/cloud/openstack/os_group.py @@ -87,7 +87,7 @@ RETURN = ''' group: description: Dictionary describing the group. returned: On success when I(state) is 'present'. - type: dictionary + type: complex contains: id: description: Unique group ID diff --git a/lib/ansible/modules/cloud/openstack/os_ironic_inspect.py b/lib/ansible/modules/cloud/openstack/os_ironic_inspect.py index cda2eb4e99..398de90608 100644 --- a/lib/ansible/modules/cloud/openstack/os_ironic_inspect.py +++ b/lib/ansible/modules/cloud/openstack/os_ironic_inspect.py @@ -71,7 +71,7 @@ RETURN = ''' ansible_facts: description: Dictionary of new facts representing discovered properties of the node.. returned: changed - type: dictionary + type: complex contains: memory_mb: description: Amount of node memory as updated in the node properties diff --git a/lib/ansible/modules/cloud/openstack/os_keystone_domain.py b/lib/ansible/modules/cloud/openstack/os_keystone_domain.py index 4e5144bdff..f14445259e 100644 --- a/lib/ansible/modules/cloud/openstack/os_keystone_domain.py +++ b/lib/ansible/modules/cloud/openstack/os_keystone_domain.py @@ -80,7 +80,7 @@ RETURN = ''' domain: description: Dictionary describing the domain. returned: On success when I(state) is 'present' - type: dictionary + type: complex contains: id: description: Domain ID. diff --git a/lib/ansible/modules/cloud/openstack/os_keystone_role.py b/lib/ansible/modules/cloud/openstack/os_keystone_role.py index a1b4906f2a..95207329b6 100644 --- a/lib/ansible/modules/cloud/openstack/os_keystone_role.py +++ b/lib/ansible/modules/cloud/openstack/os_keystone_role.py @@ -65,7 +65,7 @@ RETURN = ''' role: description: Dictionary describing the role. returned: On success when I(state) is 'present'. - type: dictionary + type: complex contains: id: description: Unique role ID. diff --git a/lib/ansible/modules/cloud/openstack/os_keystone_service.py b/lib/ansible/modules/cloud/openstack/os_keystone_service.py index d85b1f9e43..c90abdc5d8 100644 --- a/lib/ansible/modules/cloud/openstack/os_keystone_service.py +++ b/lib/ansible/modules/cloud/openstack/os_keystone_service.py @@ -83,7 +83,7 @@ RETURN = ''' service: description: Dictionary describing the service. returned: On success when I(state) is 'present' - type: dictionary + type: complex contains: id: description: Service ID. diff --git a/lib/ansible/modules/cloud/openstack/os_network.py b/lib/ansible/modules/cloud/openstack/os_network.py index 3cafef4c4b..e12b1d3416 100644 --- a/lib/ansible/modules/cloud/openstack/os_network.py +++ b/lib/ansible/modules/cloud/openstack/os_network.py @@ -103,7 +103,7 @@ RETURN = ''' network: description: Dictionary describing the network. returned: On success when I(state) is 'present'. - type: dictionary + type: complex contains: id: description: Network ID. diff --git a/lib/ansible/modules/cloud/openstack/os_nova_flavor.py b/lib/ansible/modules/cloud/openstack/os_nova_flavor.py index bfcbe82124..07e2915705 100644 --- a/lib/ansible/modules/cloud/openstack/os_nova_flavor.py +++ b/lib/ansible/modules/cloud/openstack/os_nova_flavor.py @@ -130,7 +130,7 @@ RETURN = ''' flavor: description: Dictionary describing the flavor. returned: On success when I(state) is 'present' - type: dictionary + type: complex contains: id: description: Flavor ID. diff --git a/lib/ansible/modules/cloud/openstack/os_port.py b/lib/ansible/modules/cloud/openstack/os_port.py index 51ce4486b7..04bbcd148c 100644 --- a/lib/ansible/modules/cloud/openstack/os_port.py +++ b/lib/ansible/modules/cloud/openstack/os_port.py @@ -186,7 +186,7 @@ network_id: security_groups: description: Security group(s) associated with this port. returned: success - type: list of strings + type: list status: description: Port's status. returned: success @@ -194,7 +194,7 @@ status: fixed_ips: description: Fixed ip(s) associated with this port. returned: success - type: list of dicts + type: list tenant_id: description: Tenant id associated with this port. returned: success @@ -202,7 +202,7 @@ tenant_id: allowed_address_pairs: description: Allowed address pairs with this port. returned: success - type: list of dicts + type: list admin_state_up: description: Admin state up flag for this port. returned: success diff --git a/lib/ansible/modules/cloud/openstack/os_project.py b/lib/ansible/modules/cloud/openstack/os_project.py index 83c4262129..27b2040335 100644 --- a/lib/ansible/modules/cloud/openstack/os_project.py +++ b/lib/ansible/modules/cloud/openstack/os_project.py @@ -90,7 +90,7 @@ RETURN = ''' project: description: Dictionary describing the project. returned: On success when I(state) is 'present' - type: dictionary + type: complex contains: id: description: Project ID diff --git a/lib/ansible/modules/cloud/openstack/os_quota.py b/lib/ansible/modules/cloud/openstack/os_quota.py index b57482ef3e..1307e5ebd0 100644 --- a/lib/ansible/modules/cloud/openstack/os_quota.py +++ b/lib/ansible/modules/cloud/openstack/os_quota.py @@ -241,48 +241,48 @@ RETURN = ''' openstack_quotas: description: Dictionary describing the project quota. returned: Regardless if changes where made or note - type: dictionary - contains example: - "openstack_quotas": { - "compute": { - "cores": 150, - "fixed_ips": -1, - "floating_ips": 10, - "injected_file_content_bytes": 10240, - "injected_file_path_bytes": 255, - "injected_files": 5, - "instances": 100, - "key_pairs": 100, - "metadata_items": 128, - "ram": 153600, - "security_group_rules": 20, - "security_groups": 10, - "server_group_members": 10, - "server_groups": 10 - }, - "network": { - "floatingip": 50, - "network": 10, - "port": 160, - "rbac_policy": 10, - "router": 10, - "security_group": 10, - "security_group_rule": 100, - "subnet": 10, - "subnetpool": -1 - }, - "volume": { - "backup_gigabytes": 1000, - "backups": 10, - "gigabytes": 1000, - "gigabytes_lvm": -1, - "per_volume_gigabytes": -1, - "snapshots": 10, - "snapshots_lvm": -1, - "volumes": 10, - "volumes_lvm": -1 + type: complex + contains: + openstack_quotas: { + compute: { + cores: 150, + fixed_ips: -1, + floating_ips: 10, + injected_file_content_bytes: 10240, + injected_file_path_bytes: 255, + injected_files: 5, + instances: 100, + key_pairs: 100, + metadata_items: 128, + ram: 153600, + security_group_rules: 20, + security_groups: 10, + server_group_members: 10, + server_groups: 10 + }, + network: { + floatingip: 50, + network: 10, + port: 160, + rbac_policy: 10, + router: 10, + security_group: 10, + security_group_rule: 100, + subnet: 10, + subnetpool: -1 + }, + volume: { + backup_gigabytes: 1000, + backups: 10, + gigabytes: 1000, + gigabytes_lvm: -1, + per_volume_gigabytes: -1, + snapshots: 10, + snapshots_lvm: -1, + volumes: 10, + volumes_lvm: -1 + } } - } ''' diff --git a/lib/ansible/modules/cloud/openstack/os_recordset.py b/lib/ansible/modules/cloud/openstack/os_recordset.py index d9684dfe9c..01b2f45798 100644 --- a/lib/ansible/modules/cloud/openstack/os_recordset.py +++ b/lib/ansible/modules/cloud/openstack/os_recordset.py @@ -103,7 +103,7 @@ RETURN = ''' recordset: description: Dictionary describing the recordset. returned: On success when I(state) is 'present'. - type: dictionary + type: complex contains: id: description: Unique recordset ID diff --git a/lib/ansible/modules/cloud/openstack/os_router.py b/lib/ansible/modules/cloud/openstack/os_router.py index 9da84ad9b3..f2bbabdb2a 100644 --- a/lib/ansible/modules/cloud/openstack/os_router.py +++ b/lib/ansible/modules/cloud/openstack/os_router.py @@ -133,7 +133,7 @@ RETURN = ''' router: description: Dictionary describing the router. returned: On success when I(state) is 'present' - type: dictionary + type: complex contains: id: description: Router ID. diff --git a/lib/ansible/modules/cloud/openstack/os_security_group_rule.py b/lib/ansible/modules/cloud/openstack/os_security_group_rule.py index bf277b405c..3de56e29e0 100644 --- a/lib/ansible/modules/cloud/openstack/os_security_group_rule.py +++ b/lib/ansible/modules/cloud/openstack/os_security_group_rule.py @@ -136,35 +136,43 @@ RETURN = ''' id: description: Unique rule UUID. type: string + returned: state == present direction: description: The direction in which the security group rule is applied. type: string sample: 'egress' + returned: state == present ethertype: description: One of IPv4 or IPv6. type: string sample: 'IPv4' + returned: state == present port_range_min: description: The minimum port number in the range that is matched by the security group rule. type: int sample: 8000 + returned: state == present port_range_max: description: The maximum port number in the range that is matched by the security group rule. type: int sample: 8000 + returned: state == present protocol: description: The protocol that is matched by the security group rule. type: string sample: 'tcp' + returned: state == present remote_ip_prefix: description: The remote IP prefix to be associated with this security group rule. type: string sample: '0.0.0.0/0' + returned: state == present security_group_id: description: The security group ID to associate with this security group rule. type: string + returned: state == present ''' try: diff --git a/lib/ansible/modules/cloud/openstack/os_server_group.py b/lib/ansible/modules/cloud/openstack/os_server_group.py index 9d485db391..da5a11eb1a 100644 --- a/lib/ansible/modules/cloud/openstack/os_server_group.py +++ b/lib/ansible/modules/cloud/openstack/os_server_group.py @@ -93,11 +93,11 @@ name: policies: description: A list of one or more policy names of the server group. returned: success - type: list of strings + type: list members: description: A list of members in the server group. returned: success - type: list of strings + type: list metadata: description: Metadata key and value pairs. returned: success diff --git a/lib/ansible/modules/cloud/openstack/os_stack.py b/lib/ansible/modules/cloud/openstack/os_stack.py index c466e935dd..70828aa259 100644 --- a/lib/ansible/modules/cloud/openstack/os_stack.py +++ b/lib/ansible/modules/cloud/openstack/os_stack.py @@ -104,54 +104,59 @@ id: description: Stack ID. type: string sample: "97a3f543-8136-4570-920e-fd7605c989d6" + returned: always stack: - action: - description: Action, could be Create or Update. - type: string - sample: "CREATE" - creation_time: - description: Time when the action has been made. - type: string - sample: "2016-07-05T17:38:12Z" - description: - description: Description of the Stack provided in the heat template. - type: string - sample: "HOT template to create a new instance and networks" - id: - description: Stack ID. - type: string - sample: "97a3f543-8136-4570-920e-fd7605c989d6" - name: - description: Name of the Stack - type: string - sample: "test-stack" - identifier: - description: Identifier of the current Stack action. - type: string - sample: "test-stack/97a3f543-8136-4570-920e-fd7605c989d6" - links: - description: Links to the current Stack. - type: list of dict - sample: "[{'href': 'http://foo:8004/v1/7f6a/stacks/test-stack/97a3f543-8136-4570-920e-fd7605c989d6']" - outputs: - description: Output returned by the Stack. - type: list of dict - sample: "{'description': 'IP address of server1 in private network', - 'output_key': 'server1_private_ip', - 'output_value': '10.1.10.103'}" - parameters: - description: Parameters of the current Stack - type: dict - sample: "{'OS::project_id': '7f6a3a3e01164a4eb4eecb2ab7742101', - 'OS::stack_id': '97a3f543-8136-4570-920e-fd7605c989d6', - 'OS::stack_name': 'test-stack', - 'stack_status': 'CREATE_COMPLETE', - 'stack_status_reason': 'Stack CREATE completed successfully', - 'status': 'COMPLETE', - 'template_description': 'HOT template to create a new instance and networks', - 'timeout_mins': 60, - 'updated_time': null}" + description: stack info + type: complex + returned: always + contains: + action: + description: Action, could be Create or Update. + type: string + sample: "CREATE" + creation_time: + description: Time when the action has been made. + type: string + sample: "2016-07-05T17:38:12Z" + description: + description: Description of the Stack provided in the heat template. + type: string + sample: "HOT template to create a new instance and networks" + id: + description: Stack ID. + type: string + sample: "97a3f543-8136-4570-920e-fd7605c989d6" + name: + description: Name of the Stack + type: string + sample: "test-stack" + identifier: + description: Identifier of the current Stack action. + type: string + sample: "test-stack/97a3f543-8136-4570-920e-fd7605c989d6" + links: + description: Links to the current Stack. + type: list of dict + sample: "[{'href': 'http://foo:8004/v1/7f6a/stacks/test-stack/97a3f543-8136-4570-920e-fd7605c989d6']" + outputs: + description: Output returned by the Stack. + type: list of dict + sample: "{'description': 'IP address of server1 in private network', + 'output_key': 'server1_private_ip', + 'output_value': '10.1.10.103'}" + parameters: + description: Parameters of the current Stack + type: dict + sample: "{'OS::project_id': '7f6a3a3e01164a4eb4eecb2ab7742101', + 'OS::stack_id': '97a3f543-8136-4570-920e-fd7605c989d6', + 'OS::stack_name': 'test-stack', + 'stack_status': 'CREATE_COMPLETE', + 'stack_status_reason': 'Stack CREATE completed successfully', + 'status': 'COMPLETE', + 'template_description': 'HOT template to create a new instance and networks', + 'timeout_mins': 60, + 'updated_time': null}" ''' from time import sleep diff --git a/lib/ansible/modules/cloud/openstack/os_user.py b/lib/ansible/modules/cloud/openstack/os_user.py index 67d58d168e..30466791d5 100644 --- a/lib/ansible/modules/cloud/openstack/os_user.py +++ b/lib/ansible/modules/cloud/openstack/os_user.py @@ -118,7 +118,7 @@ RETURN = ''' user: description: Dictionary describing the user. returned: On success when I(state) is 'present' - type: dictionary + type: complex contains: default_project_id: description: User default project ID. Only present with Keystone >= v3. diff --git a/lib/ansible/modules/cloud/openstack/os_zone.py b/lib/ansible/modules/cloud/openstack/os_zone.py index 441fa3d775..848fe48376 100644 --- a/lib/ansible/modules/cloud/openstack/os_zone.py +++ b/lib/ansible/modules/cloud/openstack/os_zone.py @@ -102,7 +102,7 @@ RETURN = ''' zone: description: Dictionary describing the zone. returned: On success when I(state) is 'present'. - type: dictionary + type: complex contains: id: description: Unique zone ID diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_affinity_groups.py b/lib/ansible/modules/cloud/ovirt/ovirt_affinity_groups.py index 98988a78c8..667c6fe620 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_affinity_groups.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_affinity_groups.py @@ -131,6 +131,7 @@ affinity_group: description: "Dictionary of all the affinity group attributes. Affinity group attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/affinity_group." returned: On success if affinity group is found. + type: str ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_affinity_labels.py b/lib/ansible/modules/cloud/ovirt/ovirt_affinity_labels.py index aa8bb218b7..480c2665e2 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_affinity_labels.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_affinity_labels.py @@ -90,6 +90,7 @@ id: affinity_label: description: "Dictionary of all the affinity label attributes. Affinity label attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/affinity_label." + type: dict returned: On success if affinity label is found. ''' diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_auth.py b/lib/ansible/modules/cloud/ovirt/ovirt_auth.py index e9add0ea4f..d2074671c2 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_auth.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_auth.py @@ -131,7 +131,7 @@ RETURN = ''' ovirt_auth: description: Authentication facts, needed to perform authentication to oVirt/RHV. returned: success - type: dictionary + type: complex contains: token: description: SSO token which is used for connection to oVirt/RHV engine. diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_clusters.py b/lib/ansible/modules/cloud/ovirt/ovirt_clusters.py index c142a1af66..54f450278d 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_clusters.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_clusters.py @@ -256,6 +256,7 @@ id: cluster: description: "Dictionary of all the cluster attributes. Cluster attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/cluster." + type: dict returned: On success if cluster is found. ''' diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_datacenters.py b/lib/ansible/modules/cloud/ovirt/ovirt_datacenters.py index 8cd63affdb..ae83fd42a3 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_datacenters.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_datacenters.py @@ -95,6 +95,7 @@ data_center: description: "Dictionary of all the datacenter attributes. Datacenter attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/datacenter." returned: "On success if datacenter is found." + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_disks.py b/lib/ansible/modules/cloud/ovirt/ovirt_disks.py index b3afd725ba..27ed0f005f 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_disks.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_disks.py @@ -196,12 +196,14 @@ disk: description: "Dictionary of all the disk attributes. Disk attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/disk." returned: "On success if disk is found and C(vm_id) or C(vm_name) wasn't passed." + type: dict disk_attachment: description: "Dictionary of all the disk attachment attributes. Disk attachment attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/disk_attachment." returned: "On success if disk is found and C(vm_id) or C(vm_name) was passed and VM was found." + type: dict ''' import os diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_groups.py b/lib/ansible/modules/cloud/ovirt/ovirt_groups.py index dee0492b2d..a7df2002fd 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_groups.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_groups.py @@ -88,6 +88,7 @@ group: description: "Dictionary of all the group attributes. Group attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/group." returned: On success if group is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host_networks.py b/lib/ansible/modules/cloud/ovirt/ovirt_host_networks.py index a988866613..95c473b969 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host_networks.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host_networks.py @@ -136,6 +136,7 @@ host_nic: description: "Dictionary of all the host NIC attributes. Host NIC attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/host_nic." returned: On success if host NIC is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py b/lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py index dcae697b4c..9659e5f6c0 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py @@ -112,6 +112,7 @@ agent: description: "Dictionary of all the agent attributes. Agent attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/agent." returned: On success if agent is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py b/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py index 4cf883032e..5df01b2696 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_hosts.py @@ -176,6 +176,7 @@ host: description: "Dictionary of all the host attributes. Host attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/host." returned: On success if host is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_mac_pools.py b/lib/ansible/modules/cloud/ovirt/ovirt_mac_pools.py index f18c93d541..2672c2610a 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_mac_pools.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_mac_pools.py @@ -84,6 +84,7 @@ template: description: "Dictionary of all the MAC pool attributes. MAC pool attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/mac_pool." returned: On success if MAC pool is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_networks.py b/lib/ansible/modules/cloud/ovirt/ovirt_networks.py index adc5141e0f..3eeee533e5 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_networks.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_networks.py @@ -101,6 +101,7 @@ network: description: "Dictionary of all the network attributes. Network attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/network." returned: "On success if network is found." + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_nics.py b/lib/ansible/modules/cloud/ovirt/ovirt_nics.py index 0c6a4c74c0..5049f56ee4 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_nics.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_nics.py @@ -107,6 +107,7 @@ nic: description: "Dictionary of all the network interface attributes. Network interface attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/nic." returned: On success if network interface is found. + type: dict ''' try: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_permissions.py b/lib/ansible/modules/cloud/ovirt/ovirt_permissions.py index b6a9c22ab8..eae3915e0e 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_permissions.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_permissions.py @@ -122,6 +122,7 @@ permission: description: "Dictionary of all the permission attributes. Permission attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/permission." returned: On success if permission is found. + type: dict ''' try: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_quotas.py b/lib/ansible/modules/cloud/ovirt/ovirt_quotas.py index a3e3b7aa7b..ac92f4e428 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_quotas.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_quotas.py @@ -125,6 +125,7 @@ quota: description: "Dictionary of all the quota attributes. Quota attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/quota." returned: On success if quota is found. + type: dict ''' try: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_snapshots.py b/lib/ansible/modules/cloud/ovirt/ovirt_snapshots.py index 10304949ff..a94f89d895 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_snapshots.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_snapshots.py @@ -107,6 +107,7 @@ snapshot: description: "Dictionary of all the snapshot attributes. Snapshot attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/snapshot." returned: On success if snapshot is found. + type: dict ''' diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py index 725d6f9007..5b0fdbafd6 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_storage_domains.py @@ -181,6 +181,7 @@ storage_domain: description: "Dictionary of all the storage domain attributes. Storage domain attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/storage_domain." returned: On success if storage domain is found. + type: dict ''' try: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_tags.py b/lib/ansible/modules/cloud/ovirt/ovirt_tags.py index 1f12352884..0231a86b23 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_tags.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_tags.py @@ -90,6 +90,7 @@ tag: description: "Dictionary of all the tag attributes. Tag attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/tag." returned: On success if tag is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_templates.py b/lib/ansible/modules/cloud/ovirt/ovirt_templates.py index e51e949d4a..c1f7833c20 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_templates.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_templates.py @@ -117,6 +117,7 @@ template: description: "Dictionary of all the template attributes. Template attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/template." returned: On success if template is found. + type: dict ''' import time diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_users.py b/lib/ansible/modules/cloud/ovirt/ovirt_users.py index 36f7b86aa1..d983577f18 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_users.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_users.py @@ -82,6 +82,7 @@ user: description: "Dictionary of all the user attributes. User attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/user." returned: On success if user is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vmpools.py b/lib/ansible/modules/cloud/ovirt/ovirt_vmpools.py index b281cd9684..529dff1260 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vmpools.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vmpools.py @@ -106,6 +106,7 @@ vm_pool: description: "Dictionary of all the VM pool attributes. VM pool attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/vm_pool." returned: On success if VM pool is found. + type: dict ''' try: diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vms.py b/lib/ansible/modules/cloud/ovirt/ovirt_vms.py index 63ef1369a0..dbeafc6b2e 100644 --- a/lib/ansible/modules/cloud/ovirt/ovirt_vms.py +++ b/lib/ansible/modules/cloud/ovirt/ovirt_vms.py @@ -493,6 +493,7 @@ vm: description: "Dictionary of all the VM attributes. VM attributes can be found on your oVirt/RHV instance at following url: https://ovirt.example.com/ovirt-engine/api/model#types/vm." returned: On success if VM is found. + type: dict ''' import traceback diff --git a/lib/ansible/modules/cloud/packet/packet_device.py b/lib/ansible/modules/cloud/packet/packet_device.py index 741f905b21..79fbc77a94 100644 --- a/lib/ansible/modules/cloud/packet/packet_device.py +++ b/lib/ansible/modules/cloud/packet/packet_device.py @@ -205,7 +205,7 @@ changed: returned: always devices: description: Information about each device that was processed - type: array + type: list sample: '[{"hostname": "my-server.com", "id": "server-id", "public-ipv4": "147.229.15.12", "private-ipv4": "10.0.15.12", "public-ipv6": ""2604:1380:2:5200::3"}]' returned: always ''' # NOQA diff --git a/lib/ansible/modules/cloud/packet/packet_sshkey.py b/lib/ansible/modules/cloud/packet/packet_sshkey.py index b742596b32..180dffcde7 100644 --- a/lib/ansible/modules/cloud/packet/packet_sshkey.py +++ b/lib/ansible/modules/cloud/packet/packet_sshkey.py @@ -94,7 +94,7 @@ changed: returned: always sshkeys: description: Information about sshkeys that were createe/removed. - type: array + type: list sample: [ { "fingerprint": "5c:93:74:7c:ed:07:17:62:28:75:79:23:d6:08:93:46", diff --git a/lib/ansible/modules/cloud/pubnub/pubnub_blocks.py b/lib/ansible/modules/cloud/pubnub/pubnub_blocks.py index 81ed85ab9a..a2eddc6743 100644 --- a/lib/ansible/modules/cloud/pubnub/pubnub_blocks.py +++ b/lib/ansible/modules/cloud/pubnub/pubnub_blocks.py @@ -227,6 +227,7 @@ module_cache: used few times it is better to pass cached data to next module calls to speed up process." type: dict + returned: always ''' import copy import os diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest.py b/lib/ansible/modules/cloud/vmware/vmware_guest.py index 290e6ca817..fca8ef98ae 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest.py @@ -273,7 +273,7 @@ EXAMPLES = ''' RETURN = """ instance: - descripton: metadata about the new virtualmachine + description: metadata about the new virtualmachine returned: always type: dict sample: None diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py b/lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py index 451d8653aa..ab377b7dbd 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py +++ b/lib/ansible/modules/cloud/vmware/vmware_guest_snapshot.py @@ -118,7 +118,7 @@ EXAMPLES = ''' RETURN = """ instance: - descripton: metadata about the new virtualmachine + description: metadata about the new virtualmachine returned: always type: dict sample: None diff --git a/lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py b/lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py index 497d0c118b..1992a04ae9 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py +++ b/lib/ansible/modules/cloud/vmware/vmware_maintenancemode.py @@ -101,7 +101,7 @@ hostname: sample: "esxi.local.domain" status: description: Action taken - return: always + returned: always type: string sample: "ENTER" ''' diff --git a/lib/ansible/modules/cloud/vmware/vmware_resource_pool.py b/lib/ansible/modules/cloud/vmware/vmware_resource_pool.py index 5183eeb45d..911b932708 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_resource_pool.py +++ b/lib/ansible/modules/cloud/vmware/vmware_resource_pool.py @@ -135,7 +135,7 @@ EXAMPLES = ''' RETURN = """ instance: - descripton: metadata about the new resource pool + description: metadata about the new resource pool returned: always type: dict sample: None diff --git a/lib/ansible/modules/cloud/vmware/vmware_vmotion.py b/lib/ansible/modules/cloud/vmware/vmware_vmotion.py index f4c447b1d7..7af3af74f0 100644 --- a/lib/ansible/modules/cloud/vmware/vmware_vmotion.py +++ b/lib/ansible/modules/cloud/vmware/vmware_vmotion.py @@ -68,9 +68,7 @@ EXAMPLES = ''' RETURN = ''' running_host: description: List the host the virtual machine is registered to - returned: - - changed - - success + returned: changed or success type: string sample: 'host1.example.com' '''