summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Magician <magic-modules@google.com>2019-04-03 10:31:34 -0700
committeransibot <ansibot@users.noreply.github.com>2019-04-03 13:31:34 -0400
commitbb1704c3605824cc6269147c96b99a047229132f (patch)
tree78024a159e9f2d49da2bcc69d73134a993d23efd
parent1eef039929f927af873d6eb2b150f18f008dcc50 (diff)
downloadansible-bb1704c3605824cc6269147c96b99a047229132f.tar.gz
Bug fixes for GCP modules (#54763)
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_router.py11
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_router_facts.py2
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py11
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py2
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py11
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py2
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py24
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py4
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_pool.py25
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py4
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py25
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py4
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py12
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py2
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py11
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py2
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_url_map.py53
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py8
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py23
19 files changed, 125 insertions, 111 deletions
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router.py b/lib/ansible/modules/cloud/google/gcp_compute_router.py
index 83ecca83de..d15a4b11ef 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_router.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_router.py
@@ -63,9 +63,10 @@ options:
description:
- A reference to the network to which this router belongs.
- 'This field represents a link to a Network resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
- task and then set this network field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_network task and then set this network field to "{{ name-of-resource
+ }}"'
required: true
bgp:
description:
@@ -181,7 +182,7 @@ network:
description:
- A reference to the network to which this router belongs.
returned: success
- type: str
+ type: dict
bgp:
description:
- BGP information specific to this router.
@@ -258,7 +259,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'),
description=dict(type='str'),
- network=dict(required=True),
+ network=dict(required=True, type='dict'),
bgp=dict(
type='dict',
options=dict(
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_router_facts.py
index 45c00d8af7..fd454ea5bd 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 @@ items:
description:
- A reference to the network to which this router belongs.
returned: success
- type: str
+ type: dict
bgp:
description:
- BGP information specific to this router.
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
index 5f4762a2b1..22a045b4cf 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
@@ -89,9 +89,10 @@ options:
- The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks.
- 'This field represents a link to a Network resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
- task and then set this network field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_network task and then set this network field to "{{ name-of-resource
+ }}"'
required: true
enable_flow_logs:
description:
@@ -206,7 +207,7 @@ network:
- The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks.
returned: success
- type: str
+ type: dict
enableFlowLogs:
description:
- Whether to enable flow logging for this subnetwork.
@@ -276,7 +277,7 @@ def main():
description=dict(type='str'),
ip_cidr_range=dict(required=True, type='str'),
name=dict(required=True, type='str'),
- network=dict(required=True),
+ network=dict(required=True, type='dict'),
enable_flow_logs=dict(type='bool'),
secondary_ip_ranges=dict(
type='list', elements='dict', options=dict(range_name=dict(required=True, type='str'), ip_cidr_range=dict(required=True, type='str'))
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork_facts.py
index 9d24ddd967..58d67c35cc 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 @@ items:
- The network this subnet belongs to.
- Only networks that are in the distributed mode can have subnetworks.
returned: success
- type: str
+ type: dict
enableFlowLogs:
description:
- Whether to enable flow logging for this subnetwork.
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py
index 3e69a973f5..77ac93c525 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py
@@ -66,9 +66,10 @@ options:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
- 'This field represents a link to a UrlMap resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_url_map
- task and then set this url_map field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_url_map task and then set this url_map field to "{{ name-of-resource
+ }}"'
required: true
extends_documentation_fragment: gcp
notes:
@@ -164,7 +165,7 @@ urlMap:
description:
- A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
returned: success
- type: str
+ type: dict
'''
################################################################################
@@ -188,7 +189,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'),
name=dict(required=True, type='str'),
- url_map=dict(required=True),
+ url_map=dict(required=True, type='dict'),
)
)
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy_facts.py
index 1a6e68af68..0ae4f891c6 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 @@ items:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
returned: success
- type: str
+ type: dict
'''
################################################################################
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
index c9dd72cfe1..e32c47c5dd 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
@@ -86,9 +86,10 @@ options:
resource. If not set, the TargetHttpsProxy resource will not have any SSL policy
configured.
- 'This field represents a link to a SslPolicy resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_ssl_policy
- task and then set this ssl_policy field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_ssl_policy task and then set this ssl_policy field to "{{ name-of-resource
+ }}"'
required: false
version_added: 2.8
url_map:
@@ -96,9 +97,10 @@ options:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
- 'This field represents a link to a UrlMap resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_url_map
- task and then set this url_map field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_url_map task and then set this url_map field to "{{ name-of-resource
+ }}"'
required: true
extends_documentation_fragment: gcp
notes:
@@ -235,12 +237,12 @@ sslPolicy:
resource. If not set, the TargetHttpsProxy resource will not have any SSL policy
configured.
returned: success
- type: str
+ type: dict
urlMap:
description:
- A reference to the UrlMap resource that defines the mapping from URL to the BackendService.
returned: success
- type: str
+ type: dict
'''
################################################################################
@@ -265,9 +267,9 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
quic_override=dict(type='str', choices=['NONE', 'ENABLE', 'DISABLE']),
- ssl_certificates=dict(required=True, type='list'),
- ssl_policy=dict(),
- url_map=dict(required=True),
+ ssl_certificates=dict(required=True, type='list', elements='dict'),
+ ssl_policy=dict(type='dict'),
+ url_map=dict(required=True, type='dict'),
)
)
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py
index bd79ec0d85..423fe90e87 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 @@ items:
resource. If not set, the TargetHttpsProxy resource will not have any SSL
policy configured.
returned: success
- type: str
+ type: dict
urlMap:
description:
- A reference to the UrlMap resource that defines the mapping from URL to the
BackendService.
returned: success
- type: str
+ type: dict
'''
################################################################################
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
index 270e1a03ed..4d9e693c2b 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
@@ -61,9 +61,10 @@ options:
pool in the "force" mode, where traffic will be spread to the healthy instances
with the best effort, or to all instances when no instance is healthy.
- 'This field represents a link to a TargetPool resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_target_pool
- task and then set this backup_pool field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_target_pool task and then set this backup_pool field to "{{
+ name-of-resource }}"'
required: false
description:
description:
@@ -90,10 +91,10 @@ options:
checks pass. If not specified it means all member instances will be considered
healthy at all times.
- 'This field represents a link to a HttpHealthCheck resource in GCP. It can be
- specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource` to
- a gcp_compute_http_health_check task and then set this health_check field to
- "{{ name-of-resource }}"'
+ specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_http_health_check task and then set this
+ health_check field to "{{ name-of-resource }}"'
required: false
instances:
description:
@@ -158,7 +159,7 @@ backupPool:
pool in the "force" mode, where traffic will be spread to the healthy instances
with the best effort, or to all instances when no instance is healthy.
returned: success
- type: str
+ type: dict
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
@@ -191,7 +192,7 @@ healthCheck:
checks pass. If not specified it means all member instances will be considered
healthy at all times.
returned: success
- type: str
+ type: dict
id:
description:
- The unique identifier for the resource.
@@ -249,11 +250,11 @@ def main():
module = GcpModule(
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
- backup_pool=dict(),
+ backup_pool=dict(type='dict'),
description=dict(type='str'),
failover_ratio=dict(type='str'),
- health_check=dict(),
- instances=dict(type='list'),
+ health_check=dict(type='dict'),
+ instances=dict(type='list', elements='dict'),
name=dict(required=True, type='str'),
session_affinity=dict(type='str', choices=['NONE', 'CLIENT_IP', 'CLIENT_IP_PROTO']),
region=dict(required=True, type='str'),
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_pool_facts.py
index 48923e1407..884cc6dcf0 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 @@ items:
primary pool in the "force" mode, where traffic will be spread to the healthy
instances with the best effort, or to all instances when no instance is healthy.
returned: success
- type: str
+ type: dict
creationTimestamp:
description:
- Creation timestamp in RFC3339 text format.
@@ -117,7 +117,7 @@ items:
checks pass. If not specified it means all member instances will be considered
healthy at all times.
returned: success
- type: str
+ type: dict
id:
description:
- The unique identifier for the resource.
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
index ec6f54ccc2..108d2718de 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
@@ -73,10 +73,10 @@ options:
description:
- A reference to the BackendService resource.
- 'This field represents a link to a BackendService resource in GCP. It can be
- specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource` to
- a gcp_compute_backend_service task and then set this service field to "{{ name-of-resource
- }}"'
+ specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_backend_service task and then set this service
+ field to "{{ name-of-resource }}"'
required: true
ssl_certificates:
description:
@@ -90,9 +90,10 @@ options:
resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured.
- 'This field represents a link to a SslPolicy resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_ssl_policy
- task and then set this ssl_policy field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_ssl_policy task and then set this ssl_policy field to "{{ name-of-resource
+ }}"'
required: false
version_added: 2.8
extends_documentation_fragment: gcp
@@ -213,7 +214,7 @@ service:
description:
- A reference to the BackendService resource.
returned: success
- type: str
+ type: dict
sslCertificates:
description:
- A list of SslCertificate resources that are used to authenticate connections between
@@ -226,7 +227,7 @@ sslPolicy:
resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured.
returned: success
- type: str
+ type: dict
'''
################################################################################
@@ -251,9 +252,9 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
- service=dict(required=True),
- ssl_certificates=dict(required=True, type='list'),
- ssl_policy=dict(),
+ service=dict(required=True, type='dict'),
+ ssl_certificates=dict(required=True, type='list', elements='dict'),
+ ssl_policy=dict(type='dict'),
)
)
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy_facts.py
index fe582bfccf..a193754307 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 @@ items:
description:
- A reference to the BackendService resource.
returned: success
- type: str
+ type: dict
sslCertificates:
description:
- A list of SslCertificate resources that are used to authenticate connections
@@ -114,7 +114,7 @@ items:
resource. If not set, the TargetSslProxy resource will not have any SSL policy
configured.
returned: success
- type: str
+ type: dict
'''
################################################################################
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
index b10ace3174..06acbc343c 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
@@ -73,10 +73,10 @@ options:
description:
- A reference to the BackendService resource.
- 'This field represents a link to a BackendService resource in GCP. It can be
- specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource` to
- a gcp_compute_backend_service task and then set this service field to "{{ name-of-resource
- }}"'
+ specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_backend_service task and then set this service
+ field to "{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
notes:
@@ -173,7 +173,7 @@ service:
description:
- A reference to the BackendService resource.
returned: success
- type: str
+ type: dict
'''
################################################################################
@@ -198,7 +198,7 @@ def main():
description=dict(type='str'),
name=dict(required=True, type='str'),
proxy_header=dict(type='str', choices=['NONE', 'PROXY_V1']),
- service=dict(required=True),
+ service=dict(required=True, type='dict'),
)
)
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy_facts.py
index f563a0b8bf..ab0e0da300 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 @@ items:
description:
- A reference to the BackendService resource.
returned: success
- type: str
+ type: dict
'''
################################################################################
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py
index 9bf4d8c214..3e26ef4634 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway.py
@@ -65,9 +65,10 @@ options:
description:
- The network this VPN gateway is accepting traffic for.
- 'This field represents a link to a Network resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_network
- task and then set this network field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_network task and then set this network field to "{{ name-of-resource
+ }}"'
required: true
region:
description:
@@ -139,7 +140,7 @@ network:
description:
- The network this VPN gateway is accepting traffic for.
returned: success
- type: str
+ type: dict
tunnels:
description:
- A list of references to VpnTunnel resources associated with this VPN gateway.
@@ -179,7 +180,7 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
description=dict(type='str'),
name=dict(required=True, type='str'),
- network=dict(required=True),
+ network=dict(required=True, type='dict'),
region=dict(required=True, type='str'),
)
)
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_target_vpn_gateway_facts.py
index 09c6913ee6..91c2a47ac6 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 @@ items:
description:
- The network this VPN gateway is accepting traffic for.
returned: success
- type: str
+ type: dict
tunnels:
description:
- A list of references to VpnTunnel resources associated with this VPN gateway.
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py
index 5d0c6bd193..74ed45aa0b 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py
@@ -52,10 +52,10 @@ options:
description:
- A reference to BackendService resource if none of the hostRules match.
- 'This field represents a link to a BackendService resource in GCP. It can be
- specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource` to
- a gcp_compute_backend_service task and then set this default_service field to
- "{{ name-of-resource }}"'
+ specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_backend_service task and then set this default_service
+ field to "{{ name-of-resource }}"'
required: true
description:
description:
@@ -102,10 +102,10 @@ options:
- A reference to a BackendService resource. This will be used if none of the
pathRules defined by this PathMatcher is matched by the URL's path portion.
- 'This field represents a link to a BackendService resource in GCP. It can
- be specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource`
- to a gcp_compute_backend_service task and then set this default_service
- field to "{{ name-of-resource }}"'
+ be specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_backend_service task and then set this
+ default_service field to "{{ name-of-resource }}"'
required: true
description:
description:
@@ -131,10 +131,10 @@ options:
description:
- A reference to the BackendService resource if this rule is matched.
- 'This field represents a link to a BackendService resource in GCP. It
- can be specified in two ways. First, you can place in the selfLink of
- the resource here as a string Alternatively, you can add `register:
- name-of-resource` to a gcp_compute_backend_service task and then set
- this service field to "{{ name-of-resource }}"'
+ can be specified in two ways. First, you can place a dictionary with
+ key ''selfLink'' and value of your resource''s selfLink Alternatively,
+ you can add `register: name-of-resource` to a gcp_compute_backend_service
+ task and then set this service field to "{{ name-of-resource }}"'
required: true
tests:
description:
@@ -159,10 +159,10 @@ options:
- A reference to expected BackendService resource the given URL should be
mapped to.
- 'This field represents a link to a BackendService resource in GCP. It can
- be specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource`
- to a gcp_compute_backend_service task and then set this service field to
- "{{ name-of-resource }}"'
+ be specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_backend_service task and then set this
+ service field to "{{ name-of-resource }}"'
required: true
extends_documentation_fragment: gcp
'''
@@ -225,7 +225,7 @@ defaultService:
description:
- A reference to BackendService resource if none of the hostRules match.
returned: success
- type: str
+ type: dict
description:
description:
- An optional description of this resource. Provide this property when you create
@@ -289,7 +289,7 @@ pathMatchers:
- A reference to a BackendService resource. This will be used if none of the
pathRules defined by this PathMatcher is matched by the URL's path portion.
returned: success
- type: str
+ type: dict
description:
description:
- An optional description of this resource.
@@ -318,7 +318,7 @@ pathMatchers:
description:
- A reference to the BackendService resource if this rule is matched.
returned: success
- type: str
+ type: dict
tests:
description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed
@@ -346,7 +346,7 @@ tests:
- A reference to expected BackendService resource the given URL should be mapped
to.
returned: success
- type: str
+ type: dict
'''
################################################################################
@@ -368,7 +368,7 @@ def main():
module = GcpModule(
argument_spec=dict(
state=dict(default='present', choices=['present', 'absent'], type='str'),
- default_service=dict(required=True),
+ default_service=dict(required=True, type='dict'),
description=dict(type='str'),
host_rules=dict(
type='list',
@@ -382,11 +382,13 @@ def main():
type='list',
elements='dict',
options=dict(
- default_service=dict(required=True),
+ default_service=dict(required=True, type='dict'),
description=dict(type='str'),
name=dict(required=True, type='str'),
path_rules=dict(
- type='list', elements='dict', options=dict(paths=dict(required=True, type='list', elements='str'), service=dict(required=True))
+ type='list',
+ elements='dict',
+ options=dict(paths=dict(required=True, type='list', elements='str'), service=dict(required=True, type='dict')),
),
),
),
@@ -394,7 +396,10 @@ def main():
type='list',
elements='dict',
options=dict(
- description=dict(type='str'), host=dict(required=True, type='str'), path=dict(required=True, type='str'), service=dict(required=True)
+ description=dict(type='str'),
+ host=dict(required=True, type='str'),
+ path=dict(required=True, type='str'),
+ service=dict(required=True, type='dict'),
),
),
)
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py b/lib/ansible/modules/cloud/google/gcp_compute_url_map_facts.py
index 2fd5175a96..99ed600a31 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 @@ items:
description:
- A reference to BackendService resource if none of the hostRules match.
returned: success
- type: str
+ type: dict
description:
description:
- An optional description of this resource. Provide this property when you create
@@ -139,7 +139,7 @@ items:
the pathRules defined by this PathMatcher is matched by the URL's path
portion.
returned: success
- type: str
+ type: dict
description:
description:
- An optional description of this resource.
@@ -168,7 +168,7 @@ items:
description:
- A reference to the BackendService resource if this rule is matched.
returned: success
- type: str
+ type: dict
tests:
description:
- The list of expected URL mappings. Requests to update this UrlMap will succeed
@@ -196,7 +196,7 @@ items:
- A reference to expected BackendService resource the given URL should be
mapped to.
returned: success
- type: str
+ type: dict
'''
################################################################################
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py
index c88d31844c..ec7be3db05 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py
@@ -63,18 +63,19 @@ options:
description:
- URL of the Target VPN gateway with which this VPN tunnel is associated.
- 'This field represents a link to a TargetVpnGateway resource in GCP. It can
- be specified in two ways. First, you can place in the selfLink of the resource
- here as a string Alternatively, you can add `register: name-of-resource` to
- a gcp_compute_target_vpn_gateway task and then set this target_vpn_gateway field
- to "{{ name-of-resource }}"'
+ be specified in two ways. First, you can place a dictionary with key ''selfLink''
+ and value of your resource''s selfLink Alternatively, you can add `register:
+ name-of-resource` to a gcp_compute_target_vpn_gateway task and then set this
+ target_vpn_gateway field to "{{ name-of-resource }}"'
required: true
router:
description:
- URL of router resource to be used for dynamic routing.
- 'This field represents a link to a Router resource in GCP. It can be specified
- in two ways. First, you can place in the selfLink of the resource here as a
- string Alternatively, you can add `register: name-of-resource` to a gcp_compute_router
- task and then set this router field to "{{ name-of-resource }}"'
+ in two ways. First, you can place a dictionary with key ''selfLink'' and value
+ of your resource''s selfLink Alternatively, you can add `register: name-of-resource`
+ to a gcp_compute_router task and then set this router field to "{{ name-of-resource
+ }}"'
required: false
peer_ip:
description:
@@ -193,12 +194,12 @@ targetVpnGateway:
description:
- URL of the Target VPN gateway with which this VPN tunnel is associated.
returned: success
- type: str
+ type: dict
router:
description:
- URL of router resource to be used for dynamic routing.
returned: success
- type: str
+ type: dict
peerIp:
description:
- IP address of the peer VPN gateway. Only IPv4 is supported.
@@ -265,8 +266,8 @@ def main():
state=dict(default='present', choices=['present', 'absent'], type='str'),
name=dict(required=True, type='str'),
description=dict(type='str'),
- target_vpn_gateway=dict(required=True),
- router=dict(),
+ target_vpn_gateway=dict(required=True, type='dict'),
+ router=dict(type='dict'),
peer_ip=dict(required=True, type='str'),
shared_secret=dict(required=True, type='str'),
ike_version=dict(default=2, type='int'),