diff --git a/lib/ansible/module_utils/gcp_utils.py b/lib/ansible/module_utils/gcp_utils.py index ffa5b5c565bac4..ae4f88582b7a64 100644 --- a/lib/ansible/module_utils/gcp_utils.py +++ b/lib/ansible/module_utils/gcp_utils.py @@ -62,16 +62,9 @@ def replace_resource_dict(item, value): else: if not item: return item - if isinstance(item, dict): + else: return item.get(value) - # Item could be a string or a string representing a dictionary. - try: - new_item = ast.literal_eval(item) - return replace_resource_dict(new_item, value) - except ValueError: - return item - # Handles all authentication and HTTP sessions for GCP API calls. class GcpSession(object): diff --git a/lib/ansible/modules/cloud/google/gcp_compute_address.py b/lib/ansible/modules/cloud/google/gcp_compute_address.py index 1c2054a1b6e627..df536ed69198bb 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_address.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_address.py @@ -101,9 +101,10 @@ - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. - 'This field represents a link to a Subnetwork resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ name-of-resource + }}"' required: false version_added: 2.7 region: @@ -181,7 +182,7 @@ - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. returned: success - type: str + type: dict users: description: - The URLs of the resources that are using this address. @@ -219,7 +220,7 @@ def main(): description=dict(type='str'), name=dict(required=True, type='str'), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), - subnetwork=dict(), + subnetwork=dict(type='dict'), region=dict(required=True, type='str'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_address_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_address_facts.py index a6a3d67f1bf306..4ad4457577c878 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_address_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_address_facts.py @@ -122,7 +122,7 @@ - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. returned: success - type: str + type: dict users: description: - The URLs of the resources that are using this address. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py index b8a1b323b2af85..efb31664a56814 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py @@ -98,10 +98,10 @@ - When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService. - 'This field represents a link to a InstanceGroup resource in GCP. It can - be specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_instance_group task and then set this group field to "{{ - name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_instance_group task and then set this + group field to "{{ name-of-resource }}"' required: false max_connections: description: @@ -398,7 +398,7 @@ - When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService. returned: success - type: str + type: dict maxConnections: description: - The max number of simultaneous connections for the group. Can be used with @@ -655,7 +655,7 @@ def main(): balancing_mode=dict(default='UTILIZATION', type='str', choices=['UTILIZATION', 'RATE', 'CONNECTION']), capacity_scaler=dict(default=1.0, type='str'), description=dict(type='str'), - group=dict(), + group=dict(type='dict'), max_connections=dict(type='int'), max_connections_per_instance=dict(type='int'), max_rate=dict(type='int'), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py index 3a23e0cff0ecf5..aa8713d91f8de9 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py @@ -115,7 +115,7 @@ - When the BackendService has load balancing scheme INTERNAL, the instance group must be in a zone within the same region as the BackendService. returned: success - type: str + type: dict maxConnections: description: - The max number of simultaneous connections for the group. Can be used diff --git a/lib/ansible/modules/cloud/google/gcp_compute_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_disk.py index a96ca008d18a34..051683ff4d95cf 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_disk.py @@ -163,9 +163,10 @@ - The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. - 'This field represents a link to a Snapshot resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_snapshot - task and then set this source_snapshot field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_snapshot task and then set this source_snapshot field to "{{ + name-of-resource }}"' required: false source_snapshot_encryption_key: description: @@ -374,7 +375,7 @@ - The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. returned: success - type: str + type: dict sourceSnapshotEncryptionKey: description: - The customer-supplied encryption key of the source snapshot. Required if the source @@ -441,7 +442,7 @@ def main(): zone=dict(required=True, type='str'), source_image_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'))), disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'))), - source_snapshot=dict(), + source_snapshot=dict(type='dict'), source_snapshot_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'), kms_key_name=dict(type='str'))), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py index 0eac0ae6d0a18e..7d727de17ae6f6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py @@ -243,7 +243,7 @@ - The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. returned: success - type: str + type: dict sourceSnapshotEncryptionKey: description: - The customer-supplied encryption key of the source snapshot. Required if the diff --git a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py index ab70325e2032ee..082d6972fde887 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py @@ -146,9 +146,10 @@ networks/my-network projects/myproject/global/networks/my-network global/networks/default .' - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: false default: selfLink: global/networks/default @@ -341,7 +342,7 @@ networks/my-network projects/myproject/global/networks/my-network global/networks/default .' returned: success - type: str + type: dict priority: description: - Priority for this rule. This is an integer between 0 and 65535, both inclusive. @@ -433,7 +434,7 @@ def main(): direction=dict(type='str', choices=['INGRESS', 'EGRESS']), disabled=dict(type='bool'), name=dict(required=True, type='str'), - network=dict(default=dict(selfLink='global/networks/default')), + network=dict(default=dict(selfLink='global/networks/default'), type='dict'), priority=dict(default=1000, type='int'), source_ranges=dict(type='list', elements='str'), source_service_accounts=dict(type='list', elements='str'), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_firewall_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_firewall_facts.py index ecc39b5aac9613..6c266d3d00f8d7 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_firewall_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_firewall_facts.py @@ -170,7 +170,7 @@ networks/my-network projects/myproject/global/networks/my-network global/networks/default .' returned: success - type: str + type: dict priority: description: - Priority for this rule. This is an integer between 0 and 65535, both inclusive. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py index 7813b2b8802584..d00485470fcc76 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py @@ -95,10 +95,10 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." - 'This field represents a link to a BackendService resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_backend_service task and then set this backend_service field to - "{{ name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this backend_service + field to "{{ name-of-resource }}"' required: false ip_version: description: @@ -135,9 +135,10 @@ specified, the default network will be used. - This field is not used for external load balancing. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: false port_range: description: @@ -170,9 +171,10 @@ if the network is in custom subnet mode, a subnetwork must be specified. - This field is not used for external load balancing. - 'This field represents a link to a Subnetwork resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ name-of-resource + }}"' required: false target: description: @@ -183,9 +185,10 @@ target object. - This field is not used for internal load balancing. - 'This field represents a link to a TargetPool resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_target_pool - task and then set this target field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_target_pool task and then set this target field to "{{ name-of-resource + }}"' required: false version_added: 2.7 all_ports: @@ -317,7 +320,7 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." returned: success - type: str + type: dict ipVersion: description: - The IP Version that will be used by this forwarding rule. Valid options are IPV4 @@ -350,7 +353,7 @@ the default network will be used. - This field is not used for external load balancing. returned: success - type: str + type: dict portRange: description: - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, @@ -383,7 +386,7 @@ if the network is in custom subnet mode, a subnetwork must be specified. - This field is not used for external load balancing. returned: success - type: str + type: dict target: description: - A reference to a TargetPool resource to receive the matched traffic. @@ -393,7 +396,7 @@ target object. - This field is not used for internal load balancing. returned: success - type: str + type: dict allPorts: description: - When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` @@ -456,15 +459,15 @@ def main(): description=dict(type='str'), ip_address=dict(type='str'), ip_protocol=dict(type='str', choices=['TCP', 'UDP', 'ESP', 'AH', 'SCTP', 'ICMP']), - backend_service=dict(), + backend_service=dict(type='dict'), ip_version=dict(type='str', choices=['IPV4', 'IPV6']), load_balancing_scheme=dict(type='str', choices=['INTERNAL', 'EXTERNAL']), name=dict(required=True, type='str'), - network=dict(), + network=dict(type='dict'), port_range=dict(type='str'), ports=dict(type='list', elements='str'), - subnetwork=dict(), - target=dict(), + subnetwork=dict(type='dict'), + target=dict(type='dict'), all_ports=dict(type='bool'), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), service_label=dict(type='str'), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py index d0dce15b518a67..99f2e16c8df214 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule_facts.py @@ -123,7 +123,7 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." returned: success - type: str + type: dict ipVersion: description: - The IP Version that will be used by this forwarding rule. Valid options are @@ -156,7 +156,7 @@ specified, the default network will be used. - This field is not used for external load balancing. returned: success - type: str + type: dict portRange: description: - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, @@ -191,7 +191,7 @@ if the network is in custom subnet mode, a subnetwork must be specified. - This field is not used for external load balancing. returned: success - type: str + type: dict target: description: - A reference to a TargetPool resource to receive the matched traffic. @@ -201,7 +201,7 @@ to the target object. - This field is not used for internal load balancing. returned: success - type: str + type: dict allPorts: description: - When the load balancing scheme is INTERNAL and protocol is TCP/UDP, omit `port`/`port_range` diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py index 2f4749a7f6c7e6..e2f6e658849ba3 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py @@ -97,10 +97,10 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." - 'This field represents a link to a BackendService resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_backend_service task and then set this backend_service field to - "{{ name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this backend_service + field to "{{ name-of-resource }}"' required: false ip_version: description: @@ -137,9 +137,10 @@ specified, the default network will be used. - This field is not used for external load balancing. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: false port_range: description: @@ -172,9 +173,10 @@ if the network is in custom subnet mode, a subnetwork must be specified. - This field is not used for external load balancing. - 'This field represents a link to a Subnetwork resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ name-of-resource + }}"' required: false target: description: @@ -318,7 +320,7 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." returned: success - type: str + type: dict ipVersion: description: - The IP Version that will be used by this forwarding rule. Valid options are IPV4 @@ -351,7 +353,7 @@ the default network will be used. - This field is not used for external load balancing. returned: success - type: str + type: dict portRange: description: - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, @@ -384,7 +386,7 @@ if the network is in custom subnet mode, a subnetwork must be specified. - This field is not used for external load balancing. returned: success - type: str + type: dict region: description: - A reference to the region where the regional forwarding rule resides. @@ -422,14 +424,14 @@ def main(): description=dict(type='str'), ip_address=dict(type='str'), ip_protocol=dict(type='str', choices=['TCP', 'UDP', 'ESP', 'AH', 'SCTP', 'ICMP']), - backend_service=dict(), + backend_service=dict(type='dict'), ip_version=dict(type='str', choices=['IPV4', 'IPV6']), load_balancing_scheme=dict(type='str', choices=['INTERNAL', 'EXTERNAL']), name=dict(required=True, type='str'), - network=dict(), + network=dict(type='dict'), port_range=dict(type='str'), ports=dict(type='list', elements='str'), - subnetwork=dict(), + subnetwork=dict(type='dict'), target=dict(type='str'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule_facts.py index a9bc1652bb1e10..c41904100e51bf 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule_facts.py @@ -117,7 +117,7 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." returned: success - type: str + type: dict ipVersion: description: - The IP Version that will be used by this forwarding rule. Valid options are @@ -150,7 +150,7 @@ specified, the default network will be used. - This field is not used for external load balancing. returned: success - type: str + type: dict portRange: description: - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, @@ -185,7 +185,7 @@ if the network is in custom subnet mode, a subnetwork must be specified. - This field is not used for external load balancing. returned: success - type: str + type: dict region: description: - A reference to the region where the regional forwarding rule resides. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image.py b/lib/ansible/modules/cloud/google/gcp_compute_image.py index fc6baa19e2dc0b..f8db6b4308482a 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py @@ -153,9 +153,10 @@ - You must provide either this property or the rawDisk.source property but not both to create an image. - 'This field represents a link to a Disk resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_disk - task and then set this source_disk field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_disk task and then set this source_disk field to "{{ name-of-resource + }}"' required: false source_disk_encryption_key: description: @@ -384,7 +385,7 @@ - You must provide either this property or the rawDisk.source property but not both to create an image. returned: success - type: str + type: dict sourceDiskEncryptionKey: description: - The customer-supplied encryption key of the source disk. Required if the source @@ -451,7 +452,7 @@ def main(): type='dict', options=dict(container_type=dict(type='str', choices=['TAR']), sha1_checksum=dict(type='str'), source=dict(required=True, type='str')), ), - source_disk=dict(), + source_disk=dict(type='dict'), source_disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), source_disk_id=dict(type='str'), source_type=dict(type='str', choices=['RAW']), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py index bcf494a7b8e43b..e6f19b09e26109 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py @@ -244,7 +244,7 @@ - You must provide either this property or the rawDisk.source property but not both to create an image. returned: success - type: str + type: dict sourceDiskEncryptionKey: description: - The customer-supplied encryption key of the source disk. Required if the source diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance.py b/lib/ansible/modules/cloud/google/gcp_compute_instance.py index e5790c2d8d6c0f..2b922c69baf28d 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py @@ -176,9 +176,10 @@ - If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. - 'This field represents a link to a Disk resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as - a string Alternatively, you can add `register: name-of-resource` to a gcp_compute_disk - task and then set this source field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and + value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_disk task and then set this source field + to "{{ name-of-resource }}"' required: false type: description: @@ -261,10 +262,10 @@ address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. - 'This field represents a link to a Address resource in GCP. It can be - specified in two ways. First, you can place in the address of the resource - here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_address task and then set this nat_ip field to "{{ - name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''address'' + and value of your resource''s address Alternatively, you can add `register: + name-of-resource` to a gcp_compute_address task and then set this nat_ip + field to "{{ name-of-resource }}"' required: false type: description: @@ -299,9 +300,10 @@ global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as - a string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and + value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_network task and then set this network + field to "{{ name-of-resource }}"' required: false network_ip: description: @@ -316,10 +318,10 @@ If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. - 'This field represents a link to a Subnetwork resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ - name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_subnetwork task and then set this subnetwork + field to "{{ name-of-resource }}"' required: false scheduling: description: @@ -617,7 +619,7 @@ - If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. returned: success - type: str + type: dict type: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, @@ -713,7 +715,7 @@ address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. returned: success - type: str + type: dict type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -755,7 +757,7 @@ is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: str + type: dict networkIP: description: - An IPv4 internal network address to assign to the instance for this network @@ -770,7 +772,7 @@ the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. returned: success - type: str + type: dict scheduling: description: - Sets the scheduling options for this instance. @@ -901,7 +903,7 @@ def main(): ), interface=dict(type='str', choices=['SCSI', 'NVME']), mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']), - source=dict(), + source=dict(type='dict'), type=dict(type='str', choices=['SCRATCH', 'PERSISTENT']), ), ), @@ -918,12 +920,14 @@ def main(): access_configs=dict( type='list', elements='dict', - options=dict(name=dict(required=True, type='str'), nat_ip=dict(), type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT'])), + options=dict( + name=dict(required=True, type='str'), nat_ip=dict(type='dict'), type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']) + ), ), alias_ip_ranges=dict(type='list', elements='dict', options=dict(ip_cidr_range=dict(type='str'), subnetwork_range_name=dict(type='str'))), - network=dict(), + network=dict(type='dict'), network_ip=dict(type='str'), - subnetwork=dict(), + subnetwork=dict(type='dict'), ), ), scheduling=dict( diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py index dbc0431292506f..950d95a4883e28 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_facts.py @@ -226,7 +226,7 @@ - If desired, you can also attach existing non-root persistent disks using this property. This field is only applicable for persistent disks. returned: success - type: str + type: dict type: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, @@ -324,7 +324,7 @@ IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. returned: success - type: str + type: dict type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -366,7 +366,7 @@ global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: str + type: dict networkIP: description: - An IPv4 internal network address to assign to the instance for this network @@ -381,7 +381,7 @@ If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. returned: success - type: str + type: dict scheduling: description: - Sets the scheduling options for this instance. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py index 7c7b9d73497fff..228cd8de38a2d3 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py @@ -83,9 +83,10 @@ description: - The network to which all instances in the instance group belong. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: false region: description: @@ -95,9 +96,10 @@ description: - The subnetwork to which all instances in the instance group belong. - 'This field represents a link to a Subnetwork resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_subnetwork task and then set this subnetwork field to "{{ name-of-resource + }}"' required: false zone: description: @@ -188,7 +190,7 @@ description: - The network to which all instances in the instance group belong. returned: success - type: str + type: dict region: description: - The region where the instance group is located (for regional resources). @@ -198,7 +200,7 @@ description: - The subnetwork to which all instances in the instance group belong. returned: success - type: str + type: dict zone: description: - A reference to the zone where the instance group resides. @@ -238,11 +240,11 @@ def main(): description=dict(type='str'), name=dict(type='str'), named_ports=dict(type='list', elements='dict', options=dict(name=dict(type='str'), port=dict(type='int'))), - network=dict(), + network=dict(type='dict'), region=dict(type='str'), - subnetwork=dict(), + subnetwork=dict(type='dict'), zone=dict(required=True, type='str'), - instances=dict(type='list'), + instances=dict(type='list', elements='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py index a875420c5dadb5..890758f2d38182 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_facts.py @@ -118,7 +118,7 @@ description: - The network to which all instances in the instance group belong. returned: success - type: str + type: dict region: description: - The region where the instance group is located (for regional resources). @@ -128,7 +128,7 @@ description: - The subnetwork to which all instances in the instance group belong. returned: success - type: str + type: dict zone: description: - A reference to the zone where the instance group resides. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py index 6153fc3a1f67fc..cca5ee042e202b 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py @@ -70,10 +70,10 @@ group uses this template to create all new instances in the managed instance group. - 'This field represents a link to a InstanceTemplate resource in GCP. It can - be specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_instance_template task and then set this instance_template field - to "{{ name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_instance_template task and then set this + instance_template field to "{{ name-of-resource }}"' required: true name: description: @@ -261,13 +261,13 @@ description: - The instance group being managed. returned: success - type: str + type: dict instanceTemplate: description: - The instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. returned: success - type: str + type: dict name: description: - The name of the managed instance group. The name must be 1-63 characters long, @@ -339,10 +339,10 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), base_instance_name=dict(required=True, type='str'), description=dict(type='str'), - instance_template=dict(required=True), + instance_template=dict(required=True, type='dict'), name=dict(required=True, type='str'), named_ports=dict(type='list', elements='dict', options=dict(name=dict(type='str'), port=dict(type='int'))), - target_pools=dict(type='list'), + target_pools=dict(type='list', elements='dict'), target_size=dict(type='int'), zone=dict(required=True, type='str'), ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py index 0d13073cfbca78..4f0d703ce1fcff 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager_facts.py @@ -162,14 +162,14 @@ description: - The instance group being managed. returned: success - type: str + type: dict instanceTemplate: description: - The instance template that is specified for this managed instance group. The group uses this template to create all new instances in the managed instance group. returned: success - type: str + type: dict name: description: - The name of the managed instance group. The name must be 1-63 characters long, diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py index 68ffdabbce2c87..566efea58dec67 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py @@ -201,10 +201,10 @@ - Note that for InstanceTemplate, specify the disk name, not the URL for the disk. - 'This field represents a link to a Disk resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as - a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_disk task and then set this source field to "{{ name-of-resource - }}"' + in two ways. First, you can place a dictionary with key ''name'' and + value of your resource''s name Alternatively, you can add `register: + name-of-resource` to a gcp_compute_disk task and then set this source + field to "{{ name-of-resource }}"' required: false type: description: @@ -273,10 +273,10 @@ IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. - 'This field represents a link to a Address resource in GCP. It can - be specified in two ways. First, you can place in the address of - the resource here as a string Alternatively, you can add `register: - name-of-resource` to a gcp_compute_address task and then set this - nat_ip field to "{{ name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with + key ''address'' and value of your resource''s address Alternatively, + you can add `register: name-of-resource` to a gcp_compute_address + task and then set this nat_ip field to "{{ name-of-resource }}"' required: false type: description: @@ -312,10 +312,10 @@ network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. - 'This field represents a link to a Network resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_network task and then set this network field to "{{ - name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_network task and then set this network + field to "{{ name-of-resource }}"' required: false network_ip: description: @@ -330,10 +330,10 @@ If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. - 'This field represents a link to a Subnetwork resource in GCP. It can - be specified in two ways. First, you can place in the selfLink of the - resource here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_subnetwork task and then set this subnetwork field - to "{{ name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with key + ''selfLink'' and value of your resource''s selfLink Alternatively, you + can add `register: name-of-resource` to a gcp_compute_subnetwork task + and then set this subnetwork field to "{{ name-of-resource }}"' required: false scheduling: description: @@ -626,7 +626,7 @@ - Note that for InstanceTemplate, specify the disk name, not the URL for the disk. returned: success - type: str + type: dict type: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, @@ -699,7 +699,7 @@ IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. returned: success - type: str + type: dict type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -741,7 +741,7 @@ global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: str + type: dict networkIP: description: - An IPv4 internal network address to assign to the instance for this network @@ -756,7 +756,7 @@ If the network is in auto subnet mode, providing the subnetwork is optional. If the network is in custom subnet mode, then this field should be specified. returned: success - type: str + type: dict scheduling: description: - Sets the scheduling options for this instance. @@ -877,7 +877,7 @@ def main(): ), interface=dict(type='str', choices=['SCSI', 'NVME']), mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']), - source=dict(), + source=dict(type='dict'), type=dict(type='str', choices=['SCRATCH', 'PERSISTENT']), ), ), @@ -893,15 +893,17 @@ def main(): type='list', elements='dict', options=dict( - name=dict(required=True, type='str'), nat_ip=dict(), type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']) + name=dict(required=True, type='str'), + nat_ip=dict(type='dict'), + type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']), ), ), alias_ip_ranges=dict( type='list', elements='dict', options=dict(ip_cidr_range=dict(type='str'), subnetwork_range_name=dict(type='str')) ), - network=dict(), + network=dict(type='dict'), network_ip=dict(type='str'), - subnetwork=dict(), + subnetwork=dict(type='dict'), ), ), scheduling=dict( diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py index b6f57d9aca69fb..612027490f20db 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template_facts.py @@ -251,7 +251,7 @@ - Note that for InstanceTemplate, specify the disk name, not the URL for the disk. returned: success - type: str + type: dict type: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not @@ -327,7 +327,7 @@ ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance. returned: success - type: str + type: dict type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -371,7 +371,7 @@ network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: str + type: dict networkIP: description: - An IPv4 internal network address to assign to the instance for this @@ -387,7 +387,7 @@ optional. If the network is in custom subnet mode, then this field should be specified. returned: success - type: str + type: dict scheduling: description: - Sets the scheduling options for this instance. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py index 3ce52d47075f43..92b951e35f2a23 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py @@ -82,9 +82,10 @@ will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. - 'This field represents a link to a Router resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_router - task and then set this router field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_router task and then set this router field to "{{ name-of-resource + }}"' required: true name: description: @@ -214,7 +215,7 @@ automatically connect the Interconnect to the network & region within which the Cloud Router is configured. returned: success - type: str + type: dict creationTimestamp: description: - Creation timestamp in RFC3339 text format. @@ -282,7 +283,7 @@ def main(): description=dict(type='str'), edge_availability_domain=dict(type='str'), type=dict(type='str', choices=['DEDICATED', 'PARTNER', 'PARTNER_PROVIDER']), - router=dict(required=True), + router=dict(required=True, type='dict'), name=dict(required=True, type='str'), candidate_subnets=dict(type='list', elements='str'), vlan_tag8021q=dict(type='int'), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py index 2d43ab07dd87cf..b374f4f0e86286 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment_facts.py @@ -154,7 +154,7 @@ will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. returned: success - type: str + type: dict creationTimestamp: description: - Creation timestamp in RFC3339 text format. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py index f789eaca2994df..12beabc75032fe 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py @@ -131,9 +131,10 @@ - The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. - 'This field represents a link to a Snapshot resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_snapshot - task and then set this source_snapshot field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_snapshot task and then set this source_snapshot field to "{{ + name-of-resource }}"' required: false source_snapshot_encryption_key: description: @@ -293,7 +294,7 @@ - The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. returned: success - type: str + type: dict sourceSnapshotEncryptionKey: description: - The customer-supplied encryption key of the source snapshot. Required if the source @@ -354,7 +355,7 @@ def main(): type=dict(type='str'), region=dict(required=True, type='str'), disk_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), - source_snapshot=dict(), + source_snapshot=dict(type='dict'), source_snapshot_encryption_key=dict(type='dict', options=dict(raw_key=dict(type='str'))), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py index d571944e002b0f..4ce0dfe5b80734 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk_facts.py @@ -194,7 +194,7 @@ - The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. returned: success - type: str + type: dict sourceSnapshotEncryptionKey: description: - The customer-supplied encryption key of the source snapshot. Required if the diff --git a/lib/ansible/modules/cloud/google/gcp_compute_route.py b/lib/ansible/modules/cloud/google/gcp_compute_route.py index e0b47593de22e5..8f62a2fe9eb433 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_route.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_route.py @@ -86,9 +86,10 @@ description: - The network that this route applies to. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: true priority: description: @@ -117,9 +118,10 @@ instances/instance * projects/project/zones/zone/instances/instance * zones/zone/instances/instance .' - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_instance - task and then set this next_hop_instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_instance task and then set this next_hop_instance field to + "{{ name-of-resource }}"' required: false next_hop_ip: description: @@ -129,9 +131,10 @@ description: - URL to a VpnTunnel that should handle matching packets. - 'This field represents a link to a VpnTunnel resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_vpn_tunnel - task and then set this next_hop_vpn_tunnel field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_vpn_tunnel task and then set this next_hop_vpn_tunnel field + to "{{ name-of-resource }}"' required: false extends_documentation_fragment: gcp notes: @@ -191,7 +194,7 @@ description: - The network that this route applies to. returned: success - type: str + type: dict priority: description: - The priority of this route. Priority is used to break ties in cases where there @@ -222,7 +225,7 @@ instances/instance * projects/project/zones/zone/instances/instance * zones/zone/instances/instance .' returned: success - type: str + type: dict nextHopIp: description: - Network IP address of an instance that should handle matching packets. @@ -232,7 +235,7 @@ description: - URL to a VpnTunnel that should handle matching packets. returned: success - type: str + type: dict nextHopNetwork: description: - URL to a Network that should handle matching packets. @@ -262,13 +265,13 @@ def main(): dest_range=dict(required=True, type='str'), description=dict(type='str'), name=dict(required=True, type='str'), - network=dict(required=True), + network=dict(required=True, type='dict'), priority=dict(type='int'), tags=dict(type='list', elements='str'), next_hop_gateway=dict(type='str'), - next_hop_instance=dict(), + next_hop_instance=dict(type='dict'), next_hop_ip=dict(type='str'), - next_hop_vpn_tunnel=dict(), + next_hop_vpn_tunnel=dict(type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py index 34de7c0e6eaf4d..9e3fc2bb19b8e8 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_route_facts.py @@ -91,7 +91,7 @@ description: - The network that this route applies to. returned: success - type: str + type: dict priority: description: - The priority of this route. Priority is used to break ties in cases where @@ -122,7 +122,7 @@ instances/instance * projects/project/zones/zone/instances/instance * zones/zone/instances/instance .' returned: success - type: str + type: dict nextHopIp: description: - Network IP address of an instance that should handle matching packets. @@ -132,7 +132,7 @@ description: - URL to a VpnTunnel that should handle matching packets. returned: success - type: str + type: dict nextHopNetwork: description: - URL to a Network that should handle matching packets. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router.py b/lib/ansible/modules/cloud/google/gcp_compute_router.py index 83ecca83de7bed..d15a4b11ef5578 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_router.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_router.py @@ -63,9 +63,10 @@ description: - A reference to the network to which this router belongs. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: true bgp: description: @@ -181,7 +182,7 @@ description: - A reference to the network to which this router belongs. returned: success - type: str + type: dict bgp: description: - BGP information specific to this router. @@ -258,7 +259,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(required=True, type='str'), description=dict(type='str'), - network=dict(required=True), + network=dict(required=True, type='dict'), bgp=dict( type='dict', options=dict( diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py index 45c00d8af7cb05..fd454ea5bd53d3 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py @@ -98,7 +98,7 @@ description: - A reference to the network to which this router belongs. returned: success - type: str + type: dict bgp: description: - BGP information specific to this router. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py index 5f4762a2b1bbf4..22a045b4cf809c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py @@ -89,9 +89,10 @@ - The network this subnet belongs to. - Only networks that are in the distributed mode can have subnetworks. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: true enable_flow_logs: description: @@ -206,7 +207,7 @@ - The network this subnet belongs to. - Only networks that are in the distributed mode can have subnetworks. returned: success - type: str + type: dict enableFlowLogs: description: - Whether to enable flow logging for this subnetwork. @@ -276,7 +277,7 @@ def main(): description=dict(type='str'), ip_cidr_range=dict(required=True, type='str'), name=dict(required=True, type='str'), - network=dict(required=True), + network=dict(required=True, type='dict'), enable_flow_logs=dict(type='bool'), secondary_ip_ranges=dict( type='list', elements='dict', options=dict(range_name=dict(required=True, type='str'), ip_cidr_range=dict(required=True, type='str')) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py index 9d24ddd967da2e..58d67c35ccd3c6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py @@ -115,7 +115,7 @@ - The network this subnet belongs to. - Only networks that are in the distributed mode can have subnetworks. returned: success - type: str + type: dict enableFlowLogs: description: - Whether to enable flow logging for this subnetwork. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py index 3e69a973f521da..77ac93c525d872 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py @@ -66,9 +66,10 @@ - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. - 'This field represents a link to a UrlMap resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_url_map - task and then set this url_map field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_url_map task and then set this url_map field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp notes: @@ -164,7 +165,7 @@ description: - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: str + type: dict ''' ################################################################################ @@ -188,7 +189,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), description=dict(type='str'), name=dict(required=True, type='str'), - url_map=dict(required=True), + url_map=dict(required=True, type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py index 1a6e68af68839c..0ae4f891c64b45 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py @@ -95,7 +95,7 @@ - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: str + type: dict ''' ################################################################################ diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py index c9dd72cfe16ef9..e32c47c5dd40cf 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py @@ -86,9 +86,10 @@ resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. - 'This field represents a link to a SslPolicy resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_ssl_policy - task and then set this ssl_policy field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_ssl_policy task and then set this ssl_policy field to "{{ name-of-resource + }}"' required: false version_added: 2.8 url_map: @@ -96,9 +97,10 @@ - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. - 'This field represents a link to a UrlMap resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_url_map - task and then set this url_map field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_url_map task and then set this url_map field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp notes: @@ -235,12 +237,12 @@ resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. returned: success - type: str + type: dict urlMap: description: - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: str + type: dict ''' ################################################################################ @@ -265,9 +267,9 @@ def main(): description=dict(type='str'), name=dict(required=True, type='str'), quic_override=dict(type='str', choices=['NONE', 'ENABLE', 'DISABLE']), - ssl_certificates=dict(required=True, type='list'), - ssl_policy=dict(), - url_map=dict(required=True), + ssl_certificates=dict(required=True, type='list', elements='dict'), + ssl_policy=dict(type='dict'), + url_map=dict(required=True, type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py index bd79ec0d85a155..423fe90e879fc7 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py @@ -112,13 +112,13 @@ resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. returned: success - type: str + type: dict urlMap: description: - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: str + type: dict ''' ################################################################################ diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py index 270e1a03edb0be..4d9e693c2bf608 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py @@ -61,9 +61,10 @@ pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. - 'This field represents a link to a TargetPool resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_target_pool - task and then set this backup_pool field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_target_pool task and then set this backup_pool field to "{{ + name-of-resource }}"' required: false description: description: @@ -90,10 +91,10 @@ checks pass. If not specified it means all member instances will be considered healthy at all times. - 'This field represents a link to a HttpHealthCheck resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_http_health_check task and then set this health_check field to - "{{ name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_http_health_check task and then set this + health_check field to "{{ name-of-resource }}"' required: false instances: description: @@ -158,7 +159,7 @@ pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. returned: success - type: str + type: dict creationTimestamp: description: - Creation timestamp in RFC3339 text format. @@ -191,7 +192,7 @@ checks pass. If not specified it means all member instances will be considered healthy at all times. returned: success - type: str + type: dict id: description: - The unique identifier for the resource. @@ -249,11 +250,11 @@ def main(): module = GcpModule( argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), - backup_pool=dict(), + backup_pool=dict(type='dict'), description=dict(type='str'), failover_ratio=dict(type='str'), - health_check=dict(), - instances=dict(type='list'), + health_check=dict(type='dict'), + instances=dict(type='list', elements='dict'), name=dict(required=True, type='str'), session_affinity=dict(type='str', choices=['NONE', 'CLIENT_IP', 'CLIENT_IP_PROTO']), region=dict(required=True, type='str'), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py index 48923e140719a2..884cc6dcf095ea 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py @@ -84,7 +84,7 @@ primary pool in the "force" mode, where traffic will be spread to the healthy instances with the best effort, or to all instances when no instance is healthy. returned: success - type: str + type: dict creationTimestamp: description: - Creation timestamp in RFC3339 text format. @@ -117,7 +117,7 @@ checks pass. If not specified it means all member instances will be considered healthy at all times. returned: success - type: str + type: dict id: description: - The unique identifier for the resource. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py index ec6f54ccc23555..108d2718de2b0e 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py @@ -73,10 +73,10 @@ description: - A reference to the BackendService resource. - 'This field represents a link to a BackendService resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_backend_service task and then set this service field to "{{ name-of-resource - }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this service + field to "{{ name-of-resource }}"' required: true ssl_certificates: description: @@ -90,9 +90,10 @@ resource. If not set, the TargetSslProxy resource will not have any SSL policy configured. - 'This field represents a link to a SslPolicy resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_ssl_policy - task and then set this ssl_policy field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_ssl_policy task and then set this ssl_policy field to "{{ name-of-resource + }}"' required: false version_added: 2.8 extends_documentation_fragment: gcp @@ -213,7 +214,7 @@ description: - A reference to the BackendService resource. returned: success - type: str + type: dict sslCertificates: description: - A list of SslCertificate resources that are used to authenticate connections between @@ -226,7 +227,7 @@ resource. If not set, the TargetSslProxy resource will not have any SSL policy configured. returned: success - type: str + type: dict ''' ################################################################################ @@ -251,9 +252,9 @@ def main(): description=dict(type='str'), name=dict(required=True, type='str'), proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']), - service=dict(required=True), - ssl_certificates=dict(required=True, type='list'), - ssl_policy=dict(), + service=dict(required=True, type='dict'), + ssl_certificates=dict(required=True, type='list', elements='dict'), + ssl_policy=dict(type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py index fe582bfccf3408..a1937543072798 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py @@ -100,7 +100,7 @@ description: - A reference to the BackendService resource. returned: success - type: str + type: dict sslCertificates: description: - A list of SslCertificate resources that are used to authenticate connections @@ -114,7 +114,7 @@ resource. If not set, the TargetSslProxy resource will not have any SSL policy configured. returned: success - type: str + type: dict ''' ################################################################################ diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py index b10ace3174f2e2..06acbc343c36f7 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py @@ -73,10 +73,10 @@ description: - A reference to the BackendService resource. - 'This field represents a link to a BackendService resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_backend_service task and then set this service field to "{{ name-of-resource - }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this service + field to "{{ name-of-resource }}"' required: true extends_documentation_fragment: gcp notes: @@ -173,7 +173,7 @@ description: - A reference to the BackendService resource. returned: success - type: str + type: dict ''' ################################################################################ @@ -198,7 +198,7 @@ def main(): description=dict(type='str'), name=dict(required=True, type='str'), proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']), - service=dict(required=True), + service=dict(required=True, type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py index f563a0b8bf4c8a..ab0e0da3008fb2 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py @@ -100,7 +100,7 @@ description: - A reference to the BackendService resource. returned: success - type: str + type: dict ''' ################################################################################ diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py index 9bf4d8c2149e08..3e26ef4634d065 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py @@ -65,9 +65,10 @@ description: - The network this VPN gateway is accepting traffic for. - 'This field represents a link to a Network resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_network task and then set this network field to "{{ name-of-resource + }}"' required: true region: description: @@ -139,7 +140,7 @@ description: - The network this VPN gateway is accepting traffic for. returned: success - type: str + type: dict tunnels: description: - A list of references to VpnTunnel resources associated with this VPN gateway. @@ -179,7 +180,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), description=dict(type='str'), name=dict(required=True, type='str'), - network=dict(required=True), + network=dict(required=True, type='dict'), region=dict(required=True, type='str'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py index 09c6913ee6bec0..91c2a47ac6fa2a 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py @@ -99,7 +99,7 @@ description: - The network this VPN gateway is accepting traffic for. returned: success - type: str + type: dict tunnels: description: - A list of references to VpnTunnel resources associated with this VPN gateway. diff --git a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py index 5d0c6bd1935d91..74ed45aa0b0f4c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py @@ -52,10 +52,10 @@ description: - A reference to BackendService resource if none of the hostRules match. - 'This field represents a link to a BackendService resource in GCP. It can be - specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_backend_service task and then set this default_service field to - "{{ name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this default_service + field to "{{ name-of-resource }}"' required: true description: description: @@ -102,10 +102,10 @@ - A reference to a BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. - 'This field represents a link to a BackendService resource in GCP. It can - be specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_backend_service task and then set this default_service - field to "{{ name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this + default_service field to "{{ name-of-resource }}"' required: true description: description: @@ -131,10 +131,10 @@ description: - A reference to the BackendService resource if this rule is matched. - 'This field represents a link to a BackendService resource in GCP. It - can be specified in two ways. First, you can place in the selfLink of - the resource here as a string Alternatively, you can add `register: - name-of-resource` to a gcp_compute_backend_service task and then set - this service field to "{{ name-of-resource }}"' + can be specified in two ways. First, you can place a dictionary with + key ''selfLink'' and value of your resource''s selfLink Alternatively, + you can add `register: name-of-resource` to a gcp_compute_backend_service + task and then set this service field to "{{ name-of-resource }}"' required: true tests: description: @@ -159,10 +159,10 @@ - A reference to expected BackendService resource the given URL should be mapped to. - 'This field represents a link to a BackendService resource in GCP. It can - be specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` - to a gcp_compute_backend_service task and then set this service field to - "{{ name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_backend_service task and then set this + service field to "{{ name-of-resource }}"' required: true extends_documentation_fragment: gcp ''' @@ -225,7 +225,7 @@ description: - A reference to BackendService resource if none of the hostRules match. returned: success - type: str + type: dict description: description: - An optional description of this resource. Provide this property when you create @@ -289,7 +289,7 @@ - A reference to a BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. returned: success - type: str + type: dict description: description: - An optional description of this resource. @@ -318,7 +318,7 @@ description: - A reference to the BackendService resource if this rule is matched. returned: success - type: str + type: dict tests: description: - The list of expected URL mappings. Requests to update this UrlMap will succeed @@ -346,7 +346,7 @@ - A reference to expected BackendService resource the given URL should be mapped to. returned: success - type: str + type: dict ''' ################################################################################ @@ -368,7 +368,7 @@ def main(): module = GcpModule( argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), - default_service=dict(required=True), + default_service=dict(required=True, type='dict'), description=dict(type='str'), host_rules=dict( type='list', @@ -382,11 +382,13 @@ def main(): type='list', elements='dict', options=dict( - default_service=dict(required=True), + default_service=dict(required=True, type='dict'), description=dict(type='str'), name=dict(required=True, type='str'), path_rules=dict( - type='list', elements='dict', options=dict(paths=dict(required=True, type='list', elements='str'), service=dict(required=True)) + type='list', + elements='dict', + options=dict(paths=dict(required=True, type='list', elements='str'), service=dict(required=True, type='dict')), ), ), ), @@ -394,7 +396,10 @@ def main(): type='list', elements='dict', options=dict( - description=dict(type='str'), host=dict(required=True, type='str'), path=dict(required=True, type='str'), service=dict(required=True) + description=dict(type='str'), + host=dict(required=True, type='str'), + path=dict(required=True, type='str'), + service=dict(required=True, type='dict'), ), ), ) diff --git a/lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py index 2fd5175a96fd52..99ed600a31f144 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py @@ -74,7 +74,7 @@ description: - A reference to BackendService resource if none of the hostRules match. returned: success - type: str + type: dict description: description: - An optional description of this resource. Provide this property when you create @@ -139,7 +139,7 @@ the pathRules defined by this PathMatcher is matched by the URL's path portion. returned: success - type: str + type: dict description: description: - An optional description of this resource. @@ -168,7 +168,7 @@ description: - A reference to the BackendService resource if this rule is matched. returned: success - type: str + type: dict tests: description: - The list of expected URL mappings. Requests to update this UrlMap will succeed @@ -196,7 +196,7 @@ - A reference to expected BackendService resource the given URL should be mapped to. returned: success - type: str + type: dict ''' ################################################################################ diff --git a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py index c88d31844cd049..ec7be3db0500e5 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py @@ -63,18 +63,19 @@ description: - URL of the Target VPN gateway with which this VPN tunnel is associated. - 'This field represents a link to a TargetVpnGateway resource in GCP. It can - be specified in two ways. First, you can place in the selfLink of the resource - here as a string Alternatively, you can add `register: name-of-resource` to - a gcp_compute_target_vpn_gateway task and then set this target_vpn_gateway field - to "{{ name-of-resource }}"' + be specified in two ways. First, you can place a dictionary with key ''selfLink'' + and value of your resource''s selfLink Alternatively, you can add `register: + name-of-resource` to a gcp_compute_target_vpn_gateway task and then set this + target_vpn_gateway field to "{{ name-of-resource }}"' required: true router: description: - URL of router resource to be used for dynamic routing. - 'This field represents a link to a Router resource in GCP. It can be specified - in two ways. First, you can place in the selfLink of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_compute_router - task and then set this router field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''selfLink'' and value + of your resource''s selfLink Alternatively, you can add `register: name-of-resource` + to a gcp_compute_router task and then set this router field to "{{ name-of-resource + }}"' required: false peer_ip: description: @@ -193,12 +194,12 @@ description: - URL of the Target VPN gateway with which this VPN tunnel is associated. returned: success - type: str + type: dict router: description: - URL of router resource to be used for dynamic routing. returned: success - type: str + type: dict peerIp: description: - IP address of the peer VPN gateway. Only IPv4 is supported. @@ -265,8 +266,8 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(required=True, type='str'), description=dict(type='str'), - target_vpn_gateway=dict(required=True), - router=dict(), + target_vpn_gateway=dict(required=True, type='dict'), + router=dict(type='dict'), peer_ip=dict(required=True, type='str'), shared_secret=dict(required=True, type='str'), ike_version=dict(default=2, type='int'), diff --git a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel_facts.py index 00d5645d1e01df..e67c1b4e0402f6 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel_facts.py @@ -93,12 +93,12 @@ description: - URL of the Target VPN gateway with which this VPN tunnel is associated. returned: success - type: str + type: dict router: description: - URL of router resource to be used for dynamic routing. returned: success - type: str + type: dict peerIp: description: - IP address of the peer VPN gateway. Only IPv4 is supported. diff --git a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py index fc4acf092e14a6..79b4e36663d36b 100644 --- a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py +++ b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py @@ -198,9 +198,10 @@ description: - The cluster this node pool belongs to. - 'This field represents a link to a Cluster resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_container_cluster - task and then set this cluster field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_container_cluster task and then set this cluster field to "{{ name-of-resource + }}"' required: true location: description: @@ -413,7 +414,7 @@ description: - The cluster this node pool belongs to. returned: success - type: str + type: dict location: description: - The location where the node pool is deployed. @@ -462,7 +463,7 @@ def main(): management=dict( type='dict', options=dict(auto_upgrade=dict(type='bool'), auto_repair=dict(type='bool'), upgrade_options=dict(type='dict', options=dict())) ), - cluster=dict(required=True), + cluster=dict(required=True, type='dict'), location=dict(required=True, type='str', aliases=['region', 'zone']), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_container_node_pool_facts.py b/lib/ansible/modules/cloud/google/gcp_container_node_pool_facts.py index a95501ed8dabd3..aae03244997318 100644 --- a/lib/ansible/modules/cloud/google/gcp_container_node_pool_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_container_node_pool_facts.py @@ -52,9 +52,10 @@ description: - The cluster this node pool belongs to. - 'This field represents a link to a Cluster resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_container_cluster - task and then set this cluster field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_container_cluster task and then set this cluster field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -252,7 +253,7 @@ description: - The cluster this node pool belongs to. returned: success - type: str + type: dict location: description: - The location where the node pool is deployed. @@ -272,7 +273,7 @@ def main(): - module = GcpModule(argument_spec=dict(location=dict(required=True, type='str', aliases=['region', 'zone']), cluster=dict(required=True))) + module = GcpModule(argument_spec=dict(location=dict(required=True, type='str', aliases=['region', 'zone']), cluster=dict(required=True, type='dict'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/cloud-platform'] diff --git a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py index d9a97252e4b1a7..6acd1957a71eb8 100644 --- a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py +++ b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py @@ -85,9 +85,10 @@ description: - Identifies the managed zone addressed by this request. - 'This field represents a link to a ManagedZone resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_dns_managed_zone - task and then set this managed_zone field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_dns_managed_zone task and then set this managed_zone field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -144,7 +145,7 @@ description: - Identifies the managed zone addressed by this request. returned: success - type: str + type: dict ''' ################################################################################ @@ -172,7 +173,7 @@ def main(): type=dict(required=True, type='str', choices=['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'SPF', 'SRV', 'TLSA', 'TXT']), ttl=dict(type='int'), target=dict(type='list', elements='str'), - managed_zone=dict(required=True), + managed_zone=dict(required=True, type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set_facts.py b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set_facts.py index 402cc4db53ce1b..1e3e6917703397 100644 --- a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set_facts.py @@ -44,9 +44,10 @@ description: - Identifies the managed zone addressed by this request. - 'This field represents a link to a ManagedZone resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_dns_managed_zone - task and then set this managed_zone field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_dns_managed_zone task and then set this managed_zone field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -91,7 +92,7 @@ description: - Identifies the managed zone addressed by this request. returned: success - type: str + type: dict ''' ################################################################################ @@ -106,7 +107,7 @@ def main(): - module = GcpModule(argument_spec=dict(managed_zone=dict(required=True))) + module = GcpModule(argument_spec=dict(managed_zone=dict(required=True, type='dict'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/ndev.clouddns.readwrite'] diff --git a/lib/ansible/modules/cloud/google/gcp_iam_service_account_key.py b/lib/ansible/modules/cloud/google/gcp_iam_service_account_key.py index 50d8ee02ebcb1e..a994c23ac2da2c 100644 --- a/lib/ansible/modules/cloud/google/gcp_iam_service_account_key.py +++ b/lib/ansible/modules/cloud/google/gcp_iam_service_account_key.py @@ -67,9 +67,10 @@ description: - The name of the serviceAccount. - 'This field represents a link to a ServiceAccount resource in GCP. It can be - specified in two ways. First, you can place in the name of the resource here - as a string Alternatively, you can add `register: name-of-resource` to a gcp_iam_service_account - task and then set this service_account field to "{{ name-of-resource }}"' + specified in two ways. First, you can place a dictionary with key ''name'' and + value of your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_iam_service_account task and then set this service_account field to + "{{ name-of-resource }}"' required: false path: description: @@ -142,7 +143,7 @@ description: - The name of the serviceAccount. returned: success - type: str + type: dict path: description: - The full name of the file that will hold the service account private key. The @@ -176,7 +177,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), private_key_type=dict(type='str', choices=['TYPE_UNSPECIFIED', 'TYPE_PKCS12_FILE', 'TYPE_GOOGLE_CREDENTIALS_FILE']), key_algorithm=dict(type='str', choices=['KEY_ALG_UNSPECIFIED', 'KEY_ALG_RSA_1024', 'KEY_ALG_RSA_2048']), - service_account=dict(), + service_account=dict(type='dict'), path=dict(type='path'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py index a71b2a62381db5..503edbd7099af1 100644 --- a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py +++ b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py @@ -56,9 +56,10 @@ description: - A reference to a Topic resource. - 'This field represents a link to a Topic resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_pubsub_topic - task and then set this topic field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_pubsub_topic task and then set this topic field to "{{ name-of-resource + }}"' required: true labels: description: @@ -170,7 +171,7 @@ description: - A reference to a Topic resource. returned: success - type: str + type: dict labels: description: - A set of key/value label pairs to assign to this Subscription. @@ -266,7 +267,7 @@ def main(): argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(required=True, type='str'), - topic=dict(required=True), + topic=dict(required=True, type='dict'), labels=dict(type='dict'), push_config=dict(type='dict', options=dict(push_endpoint=dict(required=True, type='str'), attributes=dict(type='dict'))), ack_deadline_seconds=dict(type='int'), diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription_facts.py b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription_facts.py index 52f2ed9c940644..30e39be3b2cf80 100644 --- a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription_facts.py @@ -67,7 +67,7 @@ description: - A reference to a Topic resource. returned: success - type: str + type: dict labels: description: - A set of key/value label pairs to assign to this Subscription. diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_database.py b/lib/ansible/modules/cloud/google/gcp_spanner_database.py index e9d852ed249ade..19306cdd6bb902 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database.py @@ -63,9 +63,10 @@ description: - The instance to create the database on. - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_spanner_instance - task and then set this instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_spanner_instance task and then set this instance field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp notes: @@ -117,7 +118,7 @@ description: - The instance to create the database on. returned: success - type: str + type: dict ''' ################################################################################ @@ -140,7 +141,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(required=True, type='str'), extra_statements=dict(type='list', elements='str'), - instance=dict(required=True), + instance=dict(required=True, type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_database_facts.py b/lib/ansible/modules/cloud/google/gcp_spanner_database_facts.py index 23d4f296bd8fec..e5d02ce5acc71e 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database_facts.py @@ -44,9 +44,10 @@ description: - The instance to create the database on. - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_spanner_instance - task and then set this instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_spanner_instance task and then set this instance field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -85,7 +86,7 @@ description: - The instance to create the database on. returned: success - type: str + type: dict ''' ################################################################################ @@ -100,7 +101,7 @@ def main(): - module = GcpModule(argument_spec=dict(instance=dict(required=True))) + module = GcpModule(argument_spec=dict(instance=dict(required=True, type='dict'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/spanner.admin'] diff --git a/lib/ansible/modules/cloud/google/gcp_sql_database.py b/lib/ansible/modules/cloud/google/gcp_sql_database.py index 94a65adf448bc2..c13402a1ed8500 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_database.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_database.py @@ -64,9 +64,10 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_sql_instance task and then set this instance field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -120,7 +121,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: str + type: dict ''' ################################################################################ @@ -145,7 +146,7 @@ def main(): charset=dict(type='str'), collation=dict(type='str'), name=dict(type='str'), - instance=dict(required=True), + instance=dict(required=True, type='dict'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_sql_database_facts.py b/lib/ansible/modules/cloud/google/gcp_sql_database_facts.py index df677e04694292..215fef21881ad6 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_database_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_database_facts.py @@ -44,9 +44,10 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_sql_instance task and then set this instance field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -87,7 +88,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: str + type: dict ''' ################################################################################ @@ -102,7 +103,7 @@ def main(): - module = GcpModule(argument_spec=dict(instance=dict(required=True))) + module = GcpModule(argument_spec=dict(instance=dict(required=True, type='dict'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/sqlservice.admin'] diff --git a/lib/ansible/modules/cloud/google/gcp_sql_user.py b/lib/ansible/modules/cloud/google/gcp_sql_user.py index 9699a4ea8c1e12..6428e7f3416e1c 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_user.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_user.py @@ -61,9 +61,10 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_sql_instance task and then set this instance field to "{{ name-of-resource + }}"' required: true password: description: @@ -118,7 +119,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: str + type: dict password: description: - The password for the user. @@ -147,7 +148,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), host=dict(required=True, type='str'), name=dict(required=True, type='str'), - instance=dict(required=True), + instance=dict(required=True, type='dict'), password=dict(type='str'), ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_sql_user_facts.py b/lib/ansible/modules/cloud/google/gcp_sql_user_facts.py index 9511a872f10396..3cfe6326594200 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_user_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_user_facts.py @@ -44,9 +44,10 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. - 'This field represents a link to a Instance resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_sql_instance task and then set this instance field to "{{ name-of-resource + }}"' required: true extends_documentation_fragment: gcp ''' @@ -83,7 +84,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: str + type: dict password: description: - The password for the user. @@ -103,7 +104,7 @@ def main(): - module = GcpModule(argument_spec=dict(instance=dict(required=True))) + module = GcpModule(argument_spec=dict(instance=dict(required=True, type='dict'))) if not module.params['scopes']: module.params['scopes'] = ['https://www.googleapis.com/auth/sqlservice.admin'] diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py index 73b13f7363cc9d..e33cbed23028a2 100644 --- a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py +++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py @@ -61,9 +61,10 @@ description: - The name of the bucket. - 'This field represents a link to a Bucket resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket - task and then set this bucket field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value + of your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_storage_bucket task and then set this bucket field to "{{ name-of-resource + }}"' required: true entity: description: @@ -140,9 +141,10 @@ description: - The name of the bucket. - 'This field represents a link to a Bucket resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a - string Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket - task and then set this bucket field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value + of your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_storage_bucket task and then set this bucket field to "{{ name-of-resource + }}"' required: true entity: description: @@ -359,7 +361,7 @@ description: - The name of the bucket. returned: success - type: str + type: dict domain: description: - The domain associated with the entity. @@ -453,7 +455,7 @@ description: - The name of the bucket. returned: success - type: str + type: dict domain: description: - The domain associated with the entity. @@ -740,7 +742,7 @@ def main(): type='list', elements='dict', options=dict( - bucket=dict(required=True), + bucket=dict(required=True, type='dict'), entity=dict(required=True, type='str'), entity_id=dict(type='str'), project_team=dict( @@ -763,7 +765,7 @@ def main(): type='list', elements='dict', options=dict( - bucket=dict(required=True), + bucket=dict(required=True, type='dict'), entity=dict(required=True, type='str'), object=dict(type='str'), role=dict(required=True, type='str', choices=['OWNER', 'READER']), diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py index 8e25f11418a49e..49c9dc76e79c8f 100644 --- a/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py +++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py @@ -60,9 +60,10 @@ description: - The name of the bucket. - 'This field represents a link to a Bucket resource in GCP. It can be specified - in two ways. First, you can place in the name of the resource here as a string - Alternatively, you can add `register: name-of-resource` to a gcp_storage_bucket - task and then set this bucket field to "{{ name-of-resource }}"' + in two ways. First, you can place a dictionary with key ''name'' and value of + your resource''s name Alternatively, you can add `register: name-of-resource` + to a gcp_storage_bucket task and then set this bucket field to "{{ name-of-resource + }}"' required: true entity: description: @@ -131,7 +132,7 @@ description: - The name of the bucket. returned: success - type: str + type: dict domain: description: - The domain associated with the entity. @@ -203,7 +204,7 @@ def main(): module = GcpModule( argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), - bucket=dict(required=True), + bucket=dict(required=True, type='dict'), entity=dict(required=True, type='str'), entity_id=dict(type='str'), project_team=dict(type='dict', options=dict(project_number=dict(type='str'), team=dict(type='str', choices=['editors', 'owners', 'viewers']))),