Bug fixes for GCP modules (#55361)

pull/56120/head
The Magician 6 years ago committed by ansibot
parent 4a371ec84e
commit ef3607f1e7

@ -58,6 +58,7 @@ EXAMPLES = '''
project: test_project
auth_kind: serviceaccount
service_account_file: "/tmp/auth.pem"
state: facts
'''
RETURN = '''

@ -61,7 +61,7 @@ extends_documentation_fragment: gcp
EXAMPLES = '''
- name: create a service account
gcp_iam_service_account:
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"'
name: "{{ sa_name }}"
display_name: My Ansible test key
project: test_project
auth_kind: serviceaccount

@ -142,7 +142,8 @@ def create(module, link):
def update(module, link):
module.fail_json(msg="Topic cannot be edited")
delete(module, self_link(module))
create(module, self_link(module))
def delete(module, link):

@ -142,7 +142,8 @@ def create(module, link):
def update(module, link):
module.fail_json(msg="Repository cannot be edited")
delete(module, self_link(module))
create(module, collection(module))
def delete(module, link):

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,3 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"
sa_name: sa-{{ 100000 | random }}@graphite-playground.google.com.iam.gserviceaccount.com

@ -15,7 +15,7 @@
# Pre-test setup
- name: delete a service account
gcp_iam_service_account:
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"'
name: "{{ sa_name }}"
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -24,7 +24,7 @@
#----------------------------------------------------------
- name: create a service account
gcp_iam_service_account:
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"'
name: "{{ sa_name }}"
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -50,7 +50,7 @@
# ----------------------------------------------------------------------------
- name: create a service account that already exists
gcp_iam_service_account:
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"'
name: "{{ sa_name }}"
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -64,7 +64,7 @@
#----------------------------------------------------------
- name: delete a service account
gcp_iam_service_account:
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"'
name: "{{ sa_name }}"
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"
@ -90,7 +90,7 @@
# ----------------------------------------------------------------------------
- name: delete a service account that does not exist
gcp_iam_service_account:
name: '"{{resource_name}}@{{gcp_project}}.google.com.iam.gserviceaccount.com"'
name: "{{ sa_name }}"
display_name: My Ansible test key
project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

@ -1,3 +1,2 @@
---
# defaults file
resource_name: '{{resource_prefix}}'
resource_name: "{{ resource_prefix }}"

Loading…
Cancel
Save