Bug fixes for GCP modules (#60339)

pull/60351/head
The Magician 5 years ago committed by ansibot
parent 5d4c3ad97e
commit 30ad73f1c1

@ -149,7 +149,7 @@ EXAMPLES = '''
state: present state: present
register: backendservice register: backendservice
- name: create a ssl certificate - name: create a SSL certificate
gcp_compute_ssl_certificate: gcp_compute_ssl_certificate:
name: sslcert-targetsslproxy name: sslcert-targetsslproxy
description: A certificate for testing. Do not use this certificate in production description: A certificate for testing. Do not use this certificate in production
@ -183,7 +183,7 @@ EXAMPLES = '''
state: present state: present
register: sslcert register: sslcert
- name: create a target ssl proxy - name: create a target SSL proxy
gcp_compute_target_ssl_proxy: gcp_compute_target_ssl_proxy:
name: test_object name: test_object
ssl_certificates: ssl_certificates:

@ -129,7 +129,7 @@ EXAMPLES = '''
state: present state: present
register: backendservice register: backendservice
- name: create a target tcp proxy - name: create a target TCP proxy
gcp_compute_target_tcp_proxy: gcp_compute_target_tcp_proxy:
name: test_object name: test_object
proxy_header: PROXY_V1 proxy_header: PROXY_V1

@ -57,7 +57,7 @@ extends_documentation_fragment: gcp
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: get info on a target VPN gateway - name: get info on a target vpn gateway
gcp_compute_target_vpn_gateway_info: gcp_compute_target_vpn_gateway_info:
region: us-west1 region: us-west1
filters: filters:

@ -198,7 +198,7 @@ EXAMPLES = '''
state: present state: present
register: instancegroup register: instancegroup
- name: create a http health check - name: create a HTTP health check
gcp_compute_http_health_check: gcp_compute_http_health_check:
name: httphealthcheck-urlmap name: httphealthcheck-urlmap
healthy_threshold: 10 healthy_threshold: 10
@ -225,7 +225,7 @@ EXAMPLES = '''
state: present state: present
register: backendservice register: backendservice
- name: create a url map - name: create a URL map
gcp_compute_url_map: gcp_compute_url_map:
name: test_object name: test_object
default_service: "{{ backendservice }}" default_service: "{{ backendservice }}"

@ -52,7 +52,7 @@ extends_documentation_fragment: gcp
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: get info on a URL map - name: get info on an URL map
gcp_compute_url_map_info: gcp_compute_url_map_info:
filters: filters:
- name = test_object - name = test_object

@ -57,7 +57,7 @@ extends_documentation_fragment: gcp
''' '''
EXAMPLES = ''' EXAMPLES = '''
- name: get info on a VPN tunnel - name: get info on a vpn tunnel
gcp_compute_vpn_tunnel_info: gcp_compute_vpn_tunnel_info:
region: us-west1 region: us-west1
filters: filters:

@ -51,7 +51,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: present state: present
register: backendservice register: backendservice
- name: create a ssl certificate - name: create a SSL certificate
gcp_compute_ssl_certificate: gcp_compute_ssl_certificate:
name: sslcert-targetsslproxy name: sslcert-targetsslproxy
description: A certificate for testing. Do not use this certificate in production description: A certificate for testing. Do not use this certificate in production
@ -84,7 +84,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: present state: present
register: sslcert register: sslcert
- name: delete a target ssl proxy - name: delete a target SSL proxy
gcp_compute_target_ssl_proxy: gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
ssl_certificates: ssl_certificates:
@ -95,7 +95,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: absent state: absent
#---------------------------------------------------------- #----------------------------------------------------------
- name: create a target ssl proxy - name: create a target SSL proxy
gcp_compute_target_ssl_proxy: gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
ssl_certificates: ssl_certificates:
@ -125,7 +125,7 @@
that: that:
- results['resources'] | length == 1 - results['resources'] | length == 1
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: create a target ssl proxy that already exists - name: create a target SSL proxy that already exists
gcp_compute_target_ssl_proxy: gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
ssl_certificates: ssl_certificates:
@ -141,7 +141,7 @@
that: that:
- result.changed == false - result.changed == false
#---------------------------------------------------------- #----------------------------------------------------------
- name: delete a target ssl proxy - name: delete a target SSL proxy
gcp_compute_target_ssl_proxy: gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
ssl_certificates: ssl_certificates:
@ -171,7 +171,7 @@
that: that:
- results['resources'] | length == 0 - results['resources'] | length == 0
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: delete a target ssl proxy that does not exist - name: delete a target SSL proxy that does not exist
gcp_compute_target_ssl_proxy: gcp_compute_target_ssl_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
ssl_certificates: ssl_certificates:
@ -189,7 +189,7 @@
#--------------------------------------------------------- #---------------------------------------------------------
# Post-test teardown # Post-test teardown
# If errors happen, don't crash the playbook! # If errors happen, don't crash the playbook!
- name: delete a ssl certificate - name: delete a SSL certificate
gcp_compute_ssl_certificate: gcp_compute_ssl_certificate:
name: sslcert-targetsslproxy name: sslcert-targetsslproxy
description: A certificate for testing. Do not use this certificate in production description: A certificate for testing. Do not use this certificate in production

@ -51,7 +51,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: present state: present
register: backendservice register: backendservice
- name: delete a target tcp proxy - name: delete a target TCP proxy
gcp_compute_target_tcp_proxy: gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
proxy_header: PROXY_V1 proxy_header: PROXY_V1
@ -61,7 +61,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: absent state: absent
#---------------------------------------------------------- #----------------------------------------------------------
- name: create a target tcp proxy - name: create a target TCP proxy
gcp_compute_target_tcp_proxy: gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
proxy_header: PROXY_V1 proxy_header: PROXY_V1
@ -90,7 +90,7 @@
that: that:
- results['resources'] | length == 1 - results['resources'] | length == 1
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: create a target tcp proxy that already exists - name: create a target TCP proxy that already exists
gcp_compute_target_tcp_proxy: gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
proxy_header: PROXY_V1 proxy_header: PROXY_V1
@ -105,7 +105,7 @@
that: that:
- result.changed == false - result.changed == false
#---------------------------------------------------------- #----------------------------------------------------------
- name: delete a target tcp proxy - name: delete a target TCP proxy
gcp_compute_target_tcp_proxy: gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
proxy_header: PROXY_V1 proxy_header: PROXY_V1
@ -134,7 +134,7 @@
that: that:
- results['resources'] | length == 0 - results['resources'] | length == 0
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: delete a target tcp proxy that does not exist - name: delete a target TCP proxy that does not exist
gcp_compute_target_tcp_proxy: gcp_compute_target_tcp_proxy:
name: "{{ resource_name }}" name: "{{ resource_name }}"
proxy_header: PROXY_V1 proxy_header: PROXY_V1

@ -22,7 +22,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: present state: present
register: instancegroup register: instancegroup
- name: create a http health check - name: create a HTTP health check
gcp_compute_http_health_check: gcp_compute_http_health_check:
name: httphealthcheck-urlmap name: httphealthcheck-urlmap
healthy_threshold: 10 healthy_threshold: 10
@ -47,7 +47,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: present state: present
register: backendservice register: backendservice
- name: delete a url map - name: delete a URL map
gcp_compute_url_map: gcp_compute_url_map:
name: "{{ resource_name }}" name: "{{ resource_name }}"
default_service: "{{ backendservice }}" default_service: "{{ backendservice }}"
@ -56,7 +56,7 @@
service_account_file: "{{ gcp_cred_file }}" service_account_file: "{{ gcp_cred_file }}"
state: absent state: absent
#---------------------------------------------------------- #----------------------------------------------------------
- name: create a url map - name: create a URL map
gcp_compute_url_map: gcp_compute_url_map:
name: "{{ resource_name }}" name: "{{ resource_name }}"
default_service: "{{ backendservice }}" default_service: "{{ backendservice }}"
@ -84,7 +84,7 @@
that: that:
- results['resources'] | length == 1 - results['resources'] | length == 1
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: create a url map that already exists - name: create a URL map that already exists
gcp_compute_url_map: gcp_compute_url_map:
name: "{{ resource_name }}" name: "{{ resource_name }}"
default_service: "{{ backendservice }}" default_service: "{{ backendservice }}"
@ -98,7 +98,7 @@
that: that:
- result.changed == false - result.changed == false
#---------------------------------------------------------- #----------------------------------------------------------
- name: delete a url map - name: delete a URL map
gcp_compute_url_map: gcp_compute_url_map:
name: "{{ resource_name }}" name: "{{ resource_name }}"
default_service: "{{ backendservice }}" default_service: "{{ backendservice }}"
@ -126,7 +126,7 @@
that: that:
- results['resources'] | length == 0 - results['resources'] | length == 0
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: delete a url map that does not exist - name: delete a URL map that does not exist
gcp_compute_url_map: gcp_compute_url_map:
name: "{{ resource_name }}" name: "{{ resource_name }}"
default_service: "{{ backendservice }}" default_service: "{{ backendservice }}"
@ -156,7 +156,7 @@
state: absent state: absent
register: backendservice register: backendservice
ignore_errors: true ignore_errors: true
- name: delete a http health check - name: delete a HTTP health check
gcp_compute_http_health_check: gcp_compute_http_health_check:
name: httphealthcheck-urlmap name: httphealthcheck-urlmap
healthy_threshold: 10 healthy_threshold: 10

Loading…
Cancel
Save