diff --git a/lib/ansible/module_utils/gcp_utils.py b/lib/ansible/module_utils/gcp_utils.py index 7baeb2a71aef1b..8f6d47c3a9d2a5 100644 --- a/lib/ansible/module_utils/gcp_utils.py +++ b/lib/ansible/module_utils/gcp_utils.py @@ -19,6 +19,7 @@ from ansible.module_utils.basic import AnsibleModule, env_fallback from ansible.module_utils.six import string_types from ansible.module_utils._text import to_text +import ast import os @@ -60,8 +61,15 @@ def replace_resource_dict(item, value): else: if not item: return item - return item.get(value) + if isinstance(item, dict): + 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 new_item # Handles all authentation 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 d42951084653eb..f93c8d450a3fe3 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_address.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_address.py @@ -102,10 +102,9 @@ - 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. You can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, - you can set this subnetwork to a dictionary with the selfLink key where the - value is the selfLink of your Subnetwork' + 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 }}"' required: false version_added: 2.7 region: @@ -183,7 +182,7 @@ - This field can only be used with INTERNAL type with GCE_ENDPOINT/DNS_RESOLVER purposes. returned: success - type: dict + type: str users: description: - The URLs of the resources that are using this address. @@ -221,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(type='dict'), + subnetwork=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 ba06eb409c6f35..d5b5140fe1889f 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: dict + type: str 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 4716e96fceaac2..d2e23376c61517 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py @@ -97,10 +97,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. You can add `register: name-of-resource` to a - gcp_compute_instance_group task and then set this group field to "{{ name-of-resource - }}" Alternatively, you can set this group to a dictionary with the selfLink - key where the value is the selfLink of your InstanceGroup' + 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 }}"' required: false max_connections: description: @@ -387,7 +387,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: dict + type: str maxConnections: description: - The max number of simultaneous connections for the group. Can be used with @@ -626,7 +626,7 @@ def main(): balancing_mode=dict(type='str', choices=['UTILIZATION', 'RATE', 'CONNECTION']), capacity_scaler=dict(type='str'), description=dict(type='str'), - group=dict(type='dict'), + group=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 e6d7feaa914599..d714c80005ee00 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: dict + type: str 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 327313991a746c..7d9990d4b8727c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_disk.py @@ -157,10 +157,9 @@ - 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. You can add `register: name-of-resource` to a gcp_compute_snapshot - task and then set this source_snapshot field to "{{ name-of-resource }}" Alternatively, - you can set this source_snapshot to a dictionary with the selfLink key where - the value is the selfLink of your Snapshot' + 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 }}"' required: false source_snapshot_encryption_key: description: @@ -351,7 +350,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: dict + type: str sourceSnapshotEncryptionKey: description: - The customer-supplied encryption key of the source snapshot. Required if the source @@ -418,7 +417,7 @@ def main(): raw_key=dict(type='str'), sha256=dict(type='str') )), - source_snapshot=dict(type='dict'), + source_snapshot=dict(), source_snapshot_encryption_key=dict(type='dict', options=dict( raw_key=dict(type='str'), sha256=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 bf5af4150cc839..cbf483fcd9025b 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_disk_facts.py @@ -224,7 +224,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: dict + type: str 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 0a91375152f986..75e9118ab3d12c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py @@ -147,10 +147,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: false default: selfLink: global/networks/default @@ -343,7 +342,7 @@ networks/my-network projects/myproject/global/networks/my-network global/networks/default .' returned: success - type: dict + type: str priority: description: - Priority for this rule. This is an integer between 0 and 65535, both inclusive. @@ -441,7 +440,7 @@ def main(): direction=dict(type='str', choices=['INGRESS', 'EGRESS']), disabled=dict(type='bool'), name=dict(required=True, type='str'), - network=dict(default={'selfLink': 'global/networks/default'}, type='dict'), + network=dict(default={'selfLink': 'global/networks/default'}), 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 1cc69b5d682d82..ae21847fd6ab92 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: dict + type: str 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 192c73160b4f47..0c844e7ef09a1e 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py @@ -96,10 +96,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. 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 }}" Alternatively, - you can set this backend_service to a dictionary with the selfLink key where - the value is the selfLink of your BackendService' + 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 }}"' required: false ip_version: description: @@ -136,10 +136,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: false port_range: description: @@ -172,10 +171,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, - you can set this subnetwork to a dictionary with the selfLink key where the - value is the selfLink of your Subnetwork' + 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 }}"' required: false target: description: @@ -186,10 +184,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_target_pool - task and then set this target field to "{{ name-of-resource }}" Alternatively, - you can set this target to a dictionary with the selfLink key where the value - is the selfLink of your TargetPool' + 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 }}"' required: false version_added: 2.7 network_tier: @@ -301,7 +298,7 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." returned: success - type: dict + type: str ipVersion: description: - The IP Version that will be used by this forwarding rule. Valid options are IPV4 @@ -334,7 +331,7 @@ the default network will be used. - This field is not used for external load balancing. returned: success - type: dict + type: str portRange: description: - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, @@ -367,7 +364,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: dict + type: str target: description: - A reference to a TargetPool resource to receive the matched traffic. @@ -377,7 +374,7 @@ target object. - This field is not used for internal load balancing. returned: success - type: dict + type: str networkTier: description: - 'The networking tier used for configuring this address. This field can take the @@ -415,15 +412,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(type='dict'), + backend_service=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(type='dict'), + network=dict(), port_range=dict(type='str'), ports=dict(type='list', elements='str'), - subnetwork=dict(type='dict'), - target=dict(type='dict'), + subnetwork=dict(), + target=dict(), network_tier=dict(type='str', choices=['PREMIUM', 'STANDARD']), region=dict(required=True, 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 e5bd5fd37ee89e..0099c445d555f0 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: dict + type: str 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: dict + type: str 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: dict + type: str 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: dict + type: str networkTier: description: - 'The networking tier used for configuring this address. This field can take 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 21acb0c69ffd86..4420c59546aae6 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 @@ -98,10 +98,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. 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 }}" Alternatively, - you can set this backend_service to a dictionary with the selfLink key where - the value is the selfLink of your BackendService' + 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 }}"' required: false ip_version: description: @@ -138,10 +138,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: false port_range: description: @@ -174,10 +173,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, - you can set this subnetwork to a dictionary with the selfLink key where the - value is the selfLink of your Subnetwork' + 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 }}"' required: false target: description: @@ -321,7 +319,7 @@ - This is used for internal load balancing. - "(not used for external load balancing) ." returned: success - type: dict + type: str ipVersion: description: - The IP Version that will be used by this forwarding rule. Valid options are IPV4 @@ -354,7 +352,7 @@ the default network will be used. - This field is not used for external load balancing. returned: success - type: dict + type: str portRange: description: - This field is used along with the target field for TargetHttpProxy, TargetHttpsProxy, @@ -387,7 +385,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: dict + type: str region: description: - A reference to the region where the regional forwarding rule resides. @@ -425,14 +423,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(type='dict'), + backend_service=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(type='dict'), + network=dict(), port_range=dict(type='str'), ports=dict(type='list', elements='str'), - subnetwork=dict(type='dict'), + subnetwork=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 3e2a134007490c..525ef8def2cb64 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: dict + type: str 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: dict + type: str 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: dict + type: str 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 51385be535258e..6f7434b347639f 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py @@ -153,10 +153,9 @@ - Refers to a gcompute_disk object 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. You can add `register: name-of-resource` to a gcp_compute_disk - task and then set this source_disk field to "{{ name-of-resource }}" Alternatively, - you can set this source_disk to a dictionary with the selfLink key where the - value is the selfLink of your Disk' + 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 }}"' required: false source_disk_encryption_key: description: @@ -375,7 +374,7 @@ - Refers to a gcompute_disk object You must provide either this property or the rawDisk.source property but not both to create an image. returned: success - type: dict + type: str sourceDiskEncryptionKey: description: - The customer-supplied encryption key of the source disk. Required if the source @@ -446,7 +445,7 @@ def main(): sha1_checksum=dict(type='str'), source=dict(type='str') )), - source_disk=dict(type='dict'), + source_disk=dict(), source_disk_encryption_key=dict(type='dict', options=dict( raw_key=dict(type='str'), sha256=dict(type='str') 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 22eede9405eec5..0e77c403254d9f 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_image_facts.py @@ -232,7 +232,7 @@ - Refers to a gcompute_disk object You must provide either this property or the rawDisk.source property but not both to create an image. returned: success - type: dict + type: str 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 8d000083467a53..df0bd94769b782 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py @@ -182,10 +182,9 @@ - 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. You can add `register: name-of-resource` to a gcp_compute_disk - task and then set this source field to "{{ name-of-resource }}" Alternatively, - you can set this source to a dictionary with the selfLink key where the - value is the selfLink of your Disk' + 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 }}"' required: false type: description: @@ -268,10 +267,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. You can add `register: name-of-resource` to a - gcp_compute_address task and then set this nat_ip field to "{{ name-of-resource - }}" Alternatively, you can set this nat_ip to a dictionary with the - address key where the value is the address of your Address' + 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 }}"' required: false type: description: @@ -311,10 +310,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the - value is the selfLink of your Network' + 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 }}"' required: false network_ip: description: @@ -329,10 +327,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. You can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, - you can set this subnetwork to a dictionary with the selfLink key where - the value is the selfLink of your Subnetwork' + 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 }}"' required: false scheduling: description: @@ -630,7 +628,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: dict + type: str type: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, @@ -726,7 +724,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: dict + type: str type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -768,7 +766,7 @@ global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: dict + type: str networkIP: description: - An IPv4 internal network address to assign to the instance for this network @@ -783,7 +781,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: dict + type: str scheduling: description: - Sets the scheduling options for this instance. @@ -915,7 +913,7 @@ def main(): )), interface=dict(type='str', choices=['SCSI', 'NVME']), mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']), - source=dict(type='dict'), + source=dict(), type=dict(type='str', choices=['SCRATCH', 'PERSISTENT']) )), guest_accelerators=dict(type='list', elements='dict', options=dict( @@ -930,7 +928,7 @@ def main(): network_interfaces=dict(type='list', elements='dict', options=dict( access_configs=dict(type='list', elements='dict', options=dict( name=dict(required=True, type='str'), - nat_ip=dict(type='dict'), + nat_ip=dict(), type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']) )), alias_ip_ranges=dict(type='list', elements='dict', options=dict( @@ -938,9 +936,9 @@ def main(): subnetwork_range_name=dict(type='str') )), name=dict(type='str'), - network=dict(type='dict'), + network=dict(), network_ip=dict(type='str'), - subnetwork=dict(type='dict') + subnetwork=dict() )), scheduling=dict(type='dict', options=dict( automatic_restart=dict(type='bool'), 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 9b6002698ca43c..336f4c64350a20 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: dict + type: str 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: dict + type: str type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -366,7 +366,7 @@ default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: dict + type: str 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: dict + type: str 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 fb10003a3dd40b..b814cce4983ce1 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py @@ -84,10 +84,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: false region: description: @@ -97,10 +96,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_subnetwork - task and then set this subnetwork field to "{{ name-of-resource }}" Alternatively, - you can set this subnetwork to a dictionary with the selfLink key where the - value is the selfLink of your Subnetwork' + 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 }}"' required: false zone: description: @@ -191,7 +189,7 @@ description: - The network to which all instances in the instance group belong. returned: success - type: dict + type: str region: description: - The region where the instance group is located (for regional resources). @@ -201,7 +199,7 @@ description: - The subnetwork to which all instances in the instance group belong. returned: success - type: dict + type: str zone: description: - A reference to the zone where the instance group resides. @@ -244,11 +242,11 @@ def main(): name=dict(type='str'), port=dict(type='int') )), - network=dict(type='dict'), + network=dict(), region=dict(type='str'), - subnetwork=dict(type='dict'), + subnetwork=dict(), zone=dict(required=True, type='str'), - instances=dict(type='list', elements='dict') + instances=dict(type='list') ) ) 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 e634572c88c9e0..19b55fc5d1c99d 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: dict + type: str 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: dict + type: str 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 d2b05b93dc55e5..77071a39bf977f 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 @@ -71,10 +71,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. 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 }}" Alternatively, - you can set this instance_template to a dictionary with the selfLink key where - the value is the selfLink of your InstanceTemplate' + 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 }}"' required: true name: description: @@ -262,13 +262,13 @@ description: - The instance group being managed. returned: success - type: dict + type: str 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: dict + type: str name: description: - The name of the managed instance group. The name must be 1-63 characters long, @@ -340,13 +340,13 @@ 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, type='dict'), + instance_template=dict(required=True), 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', elements='dict'), + target_pools=dict(type='list'), 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 243c41335a305a..e7914577e3bdd8 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: dict + type: str 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: dict + type: str 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 e4ed9770dd7919..9f6da929c3f576 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py @@ -212,10 +212,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. You can add `register: name-of-resource` to a gcp_compute_disk - task and then set this source field to "{{ name-of-resource }}" Alternatively, - you can set this source to a dictionary with the name key where the - value is the name of your Disk' + 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 + }}"' required: false type: description: @@ -284,11 +284,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. You can add `register: name-of-resource` - to a gcp_compute_address task and then set this nat_ip field to - "{{ name-of-resource }}" Alternatively, you can set this nat_ip - to a dictionary with the address key where the value is the address - of your Address' + 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 }}"' required: false type: description: @@ -329,10 +328,10 @@ default 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. You can add `register: name-of-resource` to a - gcp_compute_network task and then set this network field to "{{ name-of-resource - }}" Alternatively, you can set this network to a dictionary with the - selfLink key where the value is the selfLink of your Network' + 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 }}"' required: false network_ip: description: @@ -347,11 +346,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. You can add `register: name-of-resource` to - a gcp_compute_subnetwork task and then set this subnetwork field to - "{{ name-of-resource }}" Alternatively, you can set this subnetwork - to a dictionary with the selfLink key where the value is the selfLink - of your Subnetwork' + 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 }}"' required: false scheduling: description: @@ -644,7 +642,7 @@ - Note that for InstanceTemplate, specify the disk name, not the URL for the disk. returned: success - type: dict + type: str type: description: - Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, @@ -717,7 +715,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: dict + type: str type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -759,7 +757,7 @@ default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: dict + type: str networkIP: description: - An IPv4 internal network address to assign to the instance for this network @@ -774,7 +772,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: dict + type: str scheduling: description: - Sets the scheduling options for this instance. @@ -894,7 +892,7 @@ def main(): )), interface=dict(type='str', choices=['SCSI', 'NVME']), mode=dict(type='str', choices=['READ_WRITE', 'READ_ONLY']), - source=dict(type='dict'), + source=dict(), type=dict(type='str', choices=['SCRATCH', 'PERSISTENT']) )), machine_type=dict(required=True, type='str'), @@ -907,7 +905,7 @@ def main(): network_interfaces=dict(type='list', elements='dict', options=dict( access_configs=dict(type='list', elements='dict', options=dict( name=dict(required=True, type='str'), - nat_ip=dict(type='dict'), + nat_ip=dict(), type=dict(required=True, type='str', choices=['ONE_TO_ONE_NAT']) )), alias_ip_ranges=dict(type='list', elements='dict', options=dict( @@ -915,9 +913,9 @@ def main(): subnetwork_range_name=dict(type='str') )), name=dict(type='str'), - network=dict(type='dict'), + network=dict(), network_ip=dict(type='str'), - subnetwork=dict(type='dict') + subnetwork=dict() )), scheduling=dict(type='dict', options=dict( automatic_restart=dict(type='bool'), 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 bc6eb9398759df..e12b12c8d345e1 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: dict + type: str 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: dict + type: str type: description: - The type of configuration. The default and only option is ONE_TO_ONE_NAT. @@ -371,7 +371,7 @@ the default network global/networks/default is used; if the network is not specified but the subnetwork is specified, the network is inferred. returned: success - type: dict + type: str 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: dict + type: str 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 0e0f130267ddd1..fbead26542e79d 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py @@ -65,10 +65,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_router - task and then set this router field to "{{ name-of-resource }}" Alternatively, - you can set this router to a dictionary with the selfLink key where the value - is the selfLink of your Router' + 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 }}"' required: true name: description: @@ -150,7 +149,7 @@ automatically connect the Interconnect to the network & region within which the Cloud Router is configured. returned: success - type: dict + type: str creationTimestamp: description: - Creation timestamp in RFC3339 text format. @@ -200,7 +199,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), interconnect=dict(required=True, type='str'), description=dict(type='str'), - router=dict(required=True, type='dict'), + router=dict(required=True), name=dict(required=True, type='str'), region=dict(required=True, type='str') ) 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 3f8d3dcea4f61f..7a62962bd7da4b 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 @@ -119,7 +119,7 @@ will automatically connect the Interconnect to the network & region within which the Cloud Router is configured. returned: success - type: dict + type: str 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 4b35852e88fb1c..378a6aa1cb3d0c 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_region_disk.py @@ -129,10 +129,9 @@ - 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. You can add `register: name-of-resource` to a gcp_compute_snapshot - task and then set this source_snapshot field to "{{ name-of-resource }}" Alternatively, - you can set this source_snapshot to a dictionary with the selfLink key where - the value is the selfLink of your Snapshot' + 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 }}"' required: false source_snapshot_encryption_key: description: @@ -288,7 +287,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: dict + type: str sourceSnapshotEncryptionKey: description: - The customer-supplied encryption key of the source snapshot. Required if the source @@ -351,7 +350,7 @@ def main(): raw_key=dict(type='str'), sha256=dict(type='str') )), - source_snapshot=dict(type='dict'), + source_snapshot=dict(), source_snapshot_encryption_key=dict(type='dict', options=dict( raw_key=dict(type='str'), sha256=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 6d13a1eb7aaf89..69b3cb56b71d73 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 @@ -185,7 +185,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: dict + type: str 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 703bd66ccc8a79..6638bf663a2234 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_route.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_route.py @@ -87,10 +87,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: true priority: description: @@ -185,7 +184,7 @@ description: - The network that this route applies to. returned: success - type: dict + type: str priority: description: - The priority of this route. Priority is used to break ties in cases where there @@ -256,7 +255,7 @@ def main(): dest_range=dict(required=True, type='str'), description=dict(type='str'), name=dict(required=True, type='str'), - network=dict(required=True, type='dict'), + network=dict(required=True), priority=dict(type='int'), tags=dict(type='list', elements='str'), next_hop_gateway=dict(type='str'), 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 2e7f0dd2f4b66f..f4a487073ca025 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: dict + type: str priority: description: - The priority of this route. Priority is used to break ties in cases where diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router.py b/lib/ansible/modules/cloud/google/gcp_compute_router.py index 460371fb5274a7..6d8a9dc197b052 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_router.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_router.py @@ -64,10 +64,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: true bgp: description: @@ -183,7 +182,7 @@ description: - A reference to the network to which this router belongs. returned: success - type: dict + type: str bgp: description: - BGP information specific to this router. @@ -260,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, type='dict'), + network=dict(required=True), bgp=dict(type='dict', options=dict( asn=dict(required=True, type='int'), advertise_mode=dict(default='DEFAULT', type='str', choices=['DEFAULT', 'CUSTOM']), 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 50f61da2c1f5d7..2e9a5f4d94fb86 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: dict + type: str 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 b56c5b69b91101..42d18bc7f5c25f 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py @@ -90,10 +90,9 @@ - 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: true enable_flow_logs: description: @@ -208,7 +207,7 @@ - The network this subnet belongs to. - Only networks that are in the distributed mode can have subnetworks. returned: success - type: dict + type: str enableFlowLogs: description: - Whether to enable flow logging for this subnetwork. @@ -278,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, type='dict'), + network=dict(required=True), enable_flow_logs=dict(type='bool'), secondary_ip_ranges=dict(type='list', elements='dict', options=dict( range_name=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 e6aa384bebd5dc..4cda40c2e4644c 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: dict + type: str 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 5dcd1864506dfa..7d99f19d4262fb 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 @@ -67,10 +67,9 @@ - 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. 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 }}" Alternatively, - you can set this url_map to a dictionary with the selfLink key where the value - is the selfLink of your UrlMap' + 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 }}"' required: true extends_documentation_fragment: gcp notes: @@ -166,7 +165,7 @@ description: - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: dict + type: str ''' ################################################################################ @@ -190,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, type='dict') + url_map=dict(required=True) ) ) 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 7a558e0d9b078a..81df87fdd38b0b 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: dict + type: str ''' ################################################################################ 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 c9882dcb95a722..0cc6706f8e39e3 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 @@ -87,10 +87,9 @@ 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. 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 }}" Alternatively, - you can set this ssl_policy to a dictionary with the selfLink key where the - value is the selfLink of your SslPolicy' + 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 }}"' required: false version_added: 2.8 url_map: @@ -98,10 +97,9 @@ - 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. 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 }}" Alternatively, - you can set this url_map to a dictionary with the selfLink key where the value - is the selfLink of your UrlMap' + 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 }}"' required: true extends_documentation_fragment: gcp notes: @@ -250,12 +248,12 @@ resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. returned: success - type: dict + type: str urlMap: description: - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: dict + type: str ''' ################################################################################ @@ -280,9 +278,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', elements='dict'), - ssl_policy=dict(type='dict'), - url_map=dict(required=True, type='dict') + ssl_certificates=dict(required=True, type='list'), + ssl_policy=dict(), + url_map=dict(required=True) ) ) 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 5cfb46bfc0f61c..ab15ad25a38c2f 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: dict + type: str urlMap: description: - A reference to the UrlMap resource that defines the mapping from URL to the BackendService. returned: success - type: dict + type: str ''' ################################################################################ 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 ddb94fccd25863..237b90fd842335 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py @@ -62,10 +62,9 @@ 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. 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 }}" Alternatively, - you can set this backup_pool to a dictionary with the selfLink key where the - value is the selfLink of your TargetPool' + 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 }}"' required: false description: description: @@ -92,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. 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 }}" Alternatively, - you can set this health_check to a dictionary with the selfLink key where the - value is the selfLink of your HttpHealthCheck' + 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 }}"' required: false instances: description: @@ -160,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: dict + type: str creationTimestamp: description: - Creation timestamp in RFC3339 text format. @@ -193,7 +192,7 @@ checks pass. If not specified it means all member instances will be considered healthy at all times. returned: success - type: dict + type: str id: description: - The unique identifier for the resource. @@ -251,11 +250,11 @@ def main(): module = GcpModule( argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), - backup_pool=dict(type='dict'), + backup_pool=dict(), description=dict(type='str'), failover_ratio=dict(type='str'), - health_check=dict(type='dict'), - instances=dict(type='list', elements='dict'), + health_check=dict(), + instances=dict(type='list'), 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 47db6275023123..17ca81e2706af7 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: dict + type: str 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: dict + type: str 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 032d57ab6de6e4..8547cd9364f9d0 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 @@ -74,10 +74,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. You can add `register: name-of-resource` to a gcp_compute_backend_service - task and then set this service field to "{{ name-of-resource }}" Alternatively, - you can set this service to a dictionary with the selfLink key where the value - is the selfLink of your BackendService' + 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 + }}"' required: true ssl_certificates: description: @@ -91,10 +91,9 @@ 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. 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 }}" Alternatively, - you can set this ssl_policy to a dictionary with the selfLink key where the - value is the selfLink of your SslPolicy' + 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 }}"' required: false version_added: 2.8 extends_documentation_fragment: gcp @@ -227,7 +226,7 @@ description: - A reference to the BackendService resource. returned: success - type: dict + type: str sslCertificates: description: - A list of SslCertificate resources that are used to authenticate connections between @@ -240,7 +239,7 @@ resource. If not set, the TargetSslProxy resource will not have any SSL policy configured. returned: success - type: dict + type: str ''' ################################################################################ @@ -265,9 +264,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, type='dict'), - ssl_certificates=dict(required=True, type='list', elements='dict'), - ssl_policy=dict(type='dict') + service=dict(required=True), + ssl_certificates=dict(required=True, type='list'), + ssl_policy=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 69b2fbadcb62cb..193ae7982f5010 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: dict + type: str 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: dict + type: str ''' ################################################################################ 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 41dcf2a5dde907..9614281fb0722e 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 @@ -74,10 +74,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. You can add `register: name-of-resource` to a gcp_compute_backend_service - task and then set this service field to "{{ name-of-resource }}" Alternatively, - you can set this service to a dictionary with the selfLink key where the value - is the selfLink of your BackendService' + 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 + }}"' required: true extends_documentation_fragment: gcp notes: @@ -174,7 +174,7 @@ description: - A reference to the BackendService resource. returned: success - type: dict + type: str ''' ################################################################################ @@ -199,7 +199,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, type='dict') + service=dict(required=True) ) ) 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 cf6ca10f8db559..f29c7e7332653e 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: dict + type: str ''' ################################################################################ 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 68721994a1594c..f54c3f6c468e4d 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 @@ -66,10 +66,9 @@ 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. You can add `register: name-of-resource` to a gcp_compute_network - task and then set this network field to "{{ name-of-resource }}" Alternatively, - you can set this network to a dictionary with the selfLink key where the value - is the selfLink of your Network' + 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 }}"' required: true region: description: @@ -141,7 +140,7 @@ description: - The network this VPN gateway is accepting traffic for. returned: success - type: dict + type: str tunnels: description: - A list of references to VpnTunnel resources associated to this VPN gateway. @@ -180,7 +179,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, type='dict'), + network=dict(required=True), 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 2abbdcc6d4427f..47a5ebb8a9058f 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: dict + type: str tunnels: description: - A list of references to VpnTunnel resources associated to 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 fb557206db05fd..ddc027bcf997c7 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py @@ -53,10 +53,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. 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 }}" Alternatively, - you can set this default_service to a dictionary with the selfLink key where - the value is the selfLink of your BackendService' + 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 }}"' required: true description: description: @@ -103,11 +103,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. 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 }}" Alternatively, you can set this default_service - to a dictionary with the selfLink key where the value is the selfLink of - your BackendService' + 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 }}"' required: true description: description: @@ -133,11 +132,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. You can add `register: name-of-resource` - to a gcp_compute_backend_service task and then set this service field - to "{{ name-of-resource }}" Alternatively, you can set this service - to a dictionary with the selfLink key where the value is the selfLink - of your BackendService' + 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 }}"' required: true tests: description: @@ -162,10 +160,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. You can add `register: name-of-resource` to a - gcp_compute_backend_service task and then set this service field to "{{ - name-of-resource }}" Alternatively, you can set this service to a dictionary - with the selfLink key where the value is the selfLink of your BackendService' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -228,7 +226,7 @@ description: - A reference to BackendService resource if none of the hostRules match. returned: success - type: dict + type: str description: description: - An optional description of this resource. Provide this property when you create @@ -292,7 +290,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: dict + type: str description: description: - An optional description of this resource. @@ -321,7 +319,7 @@ description: - A reference to the BackendService resource if this rule is matched. returned: success - type: dict + type: str tests: description: - The list of expected URL mappings. Requests to update this UrlMap will succeed @@ -349,7 +347,7 @@ - A reference to expected BackendService resource the given URL should be mapped to. returned: success - type: dict + type: str ''' ################################################################################ @@ -371,7 +369,7 @@ def main(): module = GcpModule( argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), - default_service=dict(required=True, type='dict'), + default_service=dict(required=True), description=dict(type='str'), host_rules=dict(type='list', elements='dict', options=dict( description=dict(type='str'), @@ -380,19 +378,19 @@ def main(): )), name=dict(required=True, type='str'), path_matchers=dict(type='list', elements='dict', options=dict( - default_service=dict(required=True, type='dict'), + default_service=dict(required=True), 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='dict') + service=dict(required=True) )) )), tests=dict(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, type='dict') + service=dict(required=True) )) ) ) 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 9c9d6c5f3ca06c..a3125c71d5e4d8 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: dict + type: str 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: dict + type: str 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: dict + type: str 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: dict + type: str ''' ################################################################################ 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 76d023059f599a..b694fae62b68dc 100644 --- a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py +++ b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py @@ -64,19 +64,18 @@ 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. 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 }}" - Alternatively, you can set this target_vpn_gateway to a dictionary with the - selfLink key where the value is the selfLink of your TargetVpnGateway' + 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 }}"' 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. You can add `register: name-of-resource` to a gcp_compute_router - task and then set this router field to "{{ name-of-resource }}" Alternatively, - you can set this router to a dictionary with the selfLink key where the value - is the selfLink of your Router' + 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 }}"' required: false peer_ip: description: @@ -199,12 +198,12 @@ description: - URL of the Target VPN gateway with which this VPN tunnel is associated. returned: success - type: dict + type: str router: description: - URL of router resource to be used for dynamic routing. returned: success - type: dict + type: str peerIp: description: - IP address of the peer VPN gateway. Only IPv4 is supported. @@ -282,8 +281,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, type='dict'), - router=dict(type='dict'), + target_vpn_gateway=dict(required=True), + router=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 0141d1a82f66f5..d51235ecdfc1ee 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: dict + type: str router: description: - URL of router resource to be used for dynamic routing. returned: success - type: dict + type: str 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 adaac831d57a66..d6cc42d6b7bbe8 100644 --- a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py +++ b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py @@ -204,10 +204,9 @@ 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. You can add `register: name-of-resource` to a gcp_container_cluster - task and then set this cluster field to "{{ name-of-resource }}" Alternatively, - you can set this cluster to a dictionary with the name key where the value is - the name of your Cluster' + 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 }}"' required: true zone: description: @@ -416,7 +415,7 @@ description: - The cluster this node pool belongs to. returned: success - type: dict + type: str zone: description: - The zone where the node pool is deployed. @@ -470,7 +469,7 @@ def main(): description=dict(type='str') )) )), - cluster=dict(required=True, type='dict'), + cluster=dict(required=True), zone=dict(required=True, type='str') ) ) 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 343f7f8d3a61b1..48b33c2a2b9cab 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 @@ -49,10 +49,9 @@ 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. You can add `register: name-of-resource` to a gcp_container_cluster - task and then set this cluster field to "{{ name-of-resource }}" Alternatively, - you can set this cluster to a dictionary with the name key where the value is - the name of your Cluster' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -249,7 +248,7 @@ description: - The cluster this node pool belongs to. returned: success - type: dict + type: str zone: description: - The zone where the node pool is deployed. @@ -272,7 +271,7 @@ def main(): module = GcpModule( argument_spec=dict( zone=dict(required=True, type='str'), - cluster=dict(required=True, type='dict') + cluster=dict(required=True) ) ) 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 fd933ed6aae6a9..e57770486c9d57 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 @@ -86,10 +86,9 @@ - Identifies the managed zone addressed by this request. - Can be the managed zone name or id. - 'This field represents a link to a ManagedZone resource in GCP. It can be specified - in two ways. 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 }}" Alternatively, - you can set this managed_zone to a dictionary with the name key where the value - is the name of your ManagedZone' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -147,7 +146,7 @@ - Identifies the managed zone addressed by this request. - Can be the managed zone name or id. returned: success - type: dict + type: str ''' ################################################################################ @@ -175,7 +174,7 @@ def main(): type=dict(required=True, type='str', choices=['A', 'AAAA', 'CAA', 'CNAME', 'MX', 'NAPTR', 'NS', 'PTR', 'SOA', 'SPF', 'SRV', 'TXT']), ttl=dict(type='int'), target=dict(type='list', elements='str'), - managed_zone=dict(required=True, type='dict') + managed_zone=dict(required=True) ) ) 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 f5fd0c37cfe4f3..7727f87b5a78e6 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 @@ -46,10 +46,9 @@ - Identifies the managed zone addressed by this request. - Can be the managed zone name or id. - 'This field represents a link to a ManagedZone resource in GCP. It can be specified - in two ways. 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 }}" Alternatively, - you can set this managed_zone to a dictionary with the name key where the value - is the name of your ManagedZone' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -94,7 +93,7 @@ - Identifies the managed zone addressed by this request. - Can be the managed zone name or id. returned: success - type: dict + type: str ''' ################################################################################ @@ -111,7 +110,7 @@ def main(): module = GcpModule( argument_spec=dict( - managed_zone=dict(required=True, type='dict') + managed_zone=dict(required=True) ) ) 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 a5882f6615f533..c84261539fe86e 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 @@ -68,10 +68,9 @@ description: - The name of the serviceAccount. - 'This field represents a link to a ServiceAccount resource in GCP. It can be - specified in two ways. 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 }}" Alternatively, - you can set this service_account to a dictionary with the name key where the - value is the name of your ServiceAccount' + 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 }}"' required: false path: description: @@ -144,7 +143,7 @@ description: - The name of the serviceAccount. returned: success - type: dict + type: str path: description: - The full name of the file that will hold the service account private key. The @@ -178,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(type='dict'), + service_account=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 205738a25e1a54..157bc3a7224dd3 100644 --- a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py +++ b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py @@ -57,10 +57,9 @@ 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. You can add `register: name-of-resource` to a gcp_pubsub_topic - task and then set this topic field to "{{ name-of-resource }}" Alternatively, - you can set this topic to a dictionary with the name key where the value is - the name of your Topic' + 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 }}"' required: false push_config: description: @@ -125,7 +124,7 @@ description: - A reference to a Topic resource. returned: success - type: dict + type: str pushConfig: description: - If push delivery is used with this subscription, this field is used to configure @@ -179,7 +178,7 @@ def main(): argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(type='str'), - topic=dict(type='dict'), + topic=dict(), push_config=dict(type='dict', options=dict( push_endpoint=dict(type='str') )), 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 ea1f16dd7dc137..50272b74c37c91 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: dict + type: str pushConfig: description: - If push delivery is used with this subscription, this field is used to configure diff --git a/lib/ansible/modules/cloud/google/gcp_spanner_database.py b/lib/ansible/modules/cloud/google/gcp_spanner_database.py index 00bf487c43c47e..1435fc4d87819b 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database.py @@ -65,10 +65,9 @@ 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. You can add `register: name-of-resource` to a gcp_spanner_instance - task and then set this instance field to "{{ name-of-resource }}" Alternatively, - you can set this instance to a dictionary with the name key where the value - is the name of your Instance' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -118,7 +117,7 @@ description: - The instance to create the database on. returned: success - type: dict + type: str ''' ################################################################################ @@ -141,7 +140,7 @@ def main(): state=dict(default='present', choices=['present', 'absent'], type='str'), name=dict(type='str'), extra_statements=dict(type='list', elements='str'), - instance=dict(required=True, type='dict') + instance=dict(required=True) ) ) 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 87e866a5e1b884..d781a9e9925585 100644 --- a/lib/ansible/modules/cloud/google/gcp_spanner_database_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_spanner_database_facts.py @@ -45,10 +45,9 @@ 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. You can add `register: name-of-resource` to a gcp_spanner_instance - task and then set this instance field to "{{ name-of-resource }}" Alternatively, - you can set this instance to a dictionary with the name key where the value - is the name of your Instance' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -87,7 +86,7 @@ description: - The instance to create the database on. returned: success - type: dict + type: str ''' ################################################################################ @@ -104,7 +103,7 @@ def main(): module = GcpModule( argument_spec=dict( - instance=dict(required=True, type='dict') + instance=dict(required=True) ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_sql_database.py b/lib/ansible/modules/cloud/google/gcp_sql_database.py index 5a1818104498be..d19b6c7865f831 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_database.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_database.py @@ -65,10 +65,9 @@ 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. You can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}" Alternatively, - you can set this instance to a dictionary with the name key where the value - is the name of your Instance' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -122,7 +121,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: dict + type: str ''' ################################################################################ @@ -147,7 +146,7 @@ def main(): charset=dict(type='str'), collation=dict(type='str'), name=dict(type='str'), - instance=dict(required=True, type='dict') + instance=dict(required=True) ) ) 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 bebaf9cd732c6d..cc4e6bb9377c91 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_database_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_database_facts.py @@ -45,10 +45,9 @@ 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. You can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}" Alternatively, - you can set this instance to a dictionary with the name key where the value - is the name of your Instance' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -88,7 +87,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: dict + type: str ''' ################################################################################ @@ -105,7 +104,7 @@ def main(): module = GcpModule( argument_spec=dict( - instance=dict(required=True, type='dict') + instance=dict(required=True) ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_sql_user.py b/lib/ansible/modules/cloud/google/gcp_sql_user.py index 693c7465e9f297..54f7a4ff4b3d7a 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_user.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_user.py @@ -62,10 +62,9 @@ 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. You can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}" Alternatively, - you can set this instance to a dictionary with the name key where the value - is the name of your Instance' + 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 }}"' required: true password: description: @@ -120,7 +119,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: dict + type: str password: description: - The password for the user. @@ -149,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, type='dict'), + instance=dict(required=True), 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 9e89835b5e4993..462efcb22c396c 100644 --- a/lib/ansible/modules/cloud/google/gcp_sql_user_facts.py +++ b/lib/ansible/modules/cloud/google/gcp_sql_user_facts.py @@ -45,10 +45,9 @@ 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. You can add `register: name-of-resource` to a gcp_sql_instance - task and then set this instance field to "{{ name-of-resource }}" Alternatively, - you can set this instance to a dictionary with the name key where the value - is the name of your Instance' + 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 }}"' required: true extends_documentation_fragment: gcp ''' @@ -84,7 +83,7 @@ description: - The name of the Cloud SQL instance. This does not include the project ID. returned: success - type: dict + type: str password: description: - The password for the user. @@ -106,7 +105,7 @@ def main(): module = GcpModule( argument_spec=dict( - instance=dict(required=True, type='dict') + instance=dict(required=True) ) ) diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py index 3c00e92ad11b4a..6c432a9bd75059 100644 --- a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py +++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py @@ -62,10 +62,9 @@ description: - The name of the bucket. - 'This field represents a link to a Bucket resource in GCP. It can be specified - in two ways. You can add `register: name-of-resource` to a gcp_storage_bucket - task and then set this bucket field to "{{ name-of-resource }}" Alternatively, - you can set this bucket to a dictionary with the name key where the value - is the name of your Bucket' + 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 }}"' required: true domain: description: @@ -154,10 +153,9 @@ description: - The name of the bucket. - 'This field represents a link to a Bucket resource in GCP. It can be specified - in two ways. You can add `register: name-of-resource` to a gcp_storage_bucket - task and then set this bucket field to "{{ name-of-resource }}" Alternatively, - you can set this bucket to a dictionary with the name key where the value - is the name of your Bucket' + 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 }}"' required: true domain: description: @@ -415,7 +413,7 @@ description: - The name of the bucket. returned: success - type: dict + type: str domain: description: - The domain associated with the entity. @@ -509,7 +507,7 @@ description: - The name of the bucket. returned: success - type: dict + type: str domain: description: - The domain associated with the entity. @@ -793,7 +791,7 @@ def main(): argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), acl=dict(type='list', elements='dict', options=dict( - bucket=dict(required=True, type='dict'), + bucket=dict(required=True), domain=dict(type='str'), email=dict(type='str'), entity=dict(required=True, type='str'), @@ -812,7 +810,7 @@ def main(): response_header=dict(type='list', elements='str') )), default_object_acl=dict(type='list', elements='dict', options=dict( - bucket=dict(required=True, type='dict'), + bucket=dict(required=True), domain=dict(type='str'), email=dict(type='str'), entity=dict(required=True, type='str'), 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 c64b4a90a40887..6a7defa7a10600 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 @@ -61,10 +61,9 @@ description: - The name of the bucket. - 'This field represents a link to a Bucket resource in GCP. It can be specified - in two ways. You can add `register: name-of-resource` to a gcp_storage_bucket - task and then set this bucket field to "{{ name-of-resource }}" Alternatively, - you can set this bucket to a dictionary with the name key where the value is - the name of your Bucket' + 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 }}"' required: true entity: description: @@ -133,7 +132,7 @@ description: - The name of the bucket. returned: success - type: dict + type: str domain: description: - The domain associated with the entity. @@ -205,7 +204,7 @@ def main(): module = GcpModule( argument_spec=dict( state=dict(default='present', choices=['present', 'absent'], type='str'), - bucket=dict(required=True, type='dict'), + bucket=dict(required=True), entity=dict(required=True, type='str'), entity_id=dict(type='str'), project_team=dict(type='dict', options=dict(