Adding proper vars to tests (#225)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2019-04-15 12:41:18 -07:00 committed by Alex Stephen
parent 152f52d4c6
commit 66f43ea8f9
10 changed files with 15 additions and 22 deletions

View file

@ -61,7 +61,7 @@ extends_documentation_fragment: gcp
EXAMPLES = ''' EXAMPLES = '''
- name: create a service account - name: create a service account
gcp_iam_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 display_name: My Ansible test key
project: test_project project: test_project
auth_kind: serviceaccount auth_kind: serviceaccount

View file

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

View file

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

View file

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

View file

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

View file

@ -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

View file

@ -15,7 +15,7 @@
# Pre-test setup # Pre-test setup
- name: delete a service account - name: delete a service account
gcp_iam_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 display_name: My Ansible test key
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}" auth_kind: "{{ gcp_cred_kind }}"
@ -24,7 +24,7 @@
#---------------------------------------------------------- #----------------------------------------------------------
- name: create a service account - name: create a service account
gcp_iam_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 display_name: My Ansible test key
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}" auth_kind: "{{ gcp_cred_kind }}"
@ -50,7 +50,7 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: create a service account that already exists - name: create a service account that already exists
gcp_iam_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 display_name: My Ansible test key
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}" auth_kind: "{{ gcp_cred_kind }}"
@ -64,7 +64,7 @@
#---------------------------------------------------------- #----------------------------------------------------------
- name: delete a service account - name: delete a service account
gcp_iam_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 display_name: My Ansible test key
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}" auth_kind: "{{ gcp_cred_kind }}"
@ -90,7 +90,7 @@
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
- name: delete a service account that does not exist - name: delete a service account that does not exist
gcp_iam_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 display_name: My Ansible test key
project: "{{ gcp_project }}" project: "{{ gcp_project }}"
auth_kind: "{{ gcp_cred_kind }}" auth_kind: "{{ gcp_cred_kind }}"

View file

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

View file

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

View file

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