diff --git a/ansible/ci/group_vars/all.yml b/ansible/ci/group_vars/all.yml index 5be40f3348..02bb350a7c 100644 --- a/ansible/ci/group_vars/all.yml +++ b/ansible/ci/group_vars/all.yml @@ -3,7 +3,7 @@ gcp_project: "acs-san-stackroxci" gcp_auth_kind: "serviceaccount" gcp_service_account_file: /tmp/secret/stackrox-collector-e2e-tests/GOOGLE_CREDENTIALS_COLLECTOR_SVC_ACCT -gcp_instance_prefix: collector-ci +gcp_instance_prefix: ci gcp_available_zones: - us-central1-a - us-central1-b diff --git a/ansible/ci/inventory_gcp.yml b/ansible/ci/inventory_gcp.yml index 7781ea24e7..979b37a976 100644 --- a/ansible/ci/inventory_gcp.yml +++ b/ansible/ci/inventory_gcp.yml @@ -4,7 +4,7 @@ plugin: gcp_compute projects: - acs-san-stackroxci filters: - - name = collector-ci-* + - name = ci-* keyed_groups: # This will group the VMs by their labels, which means that on # creation, we can use a unique identifier to group VMs diff --git a/ansible/dev/group_vars/all.yml b/ansible/dev/group_vars/all.yml index ede663dac7..0f9f8b960d 100644 --- a/ansible/dev/group_vars/all.yml +++ b/ansible/dev/group_vars/all.yml @@ -4,7 +4,7 @@ gcp_project: "acs-team-sandbox" gcp_auth_kind: "application" gcp_service_account_file: null -gcp_instance_prefix: collector-dev +gcp_instance_prefix: dev gcp_available_zones: - us-central1-a - us-central1-b diff --git a/ansible/dev/inventory_gcp.yml b/ansible/dev/inventory_gcp.yml index 183b3fb42c..e09bc1afaa 100644 --- a/ansible/dev/inventory_gcp.yml +++ b/ansible/dev/inventory_gcp.yml @@ -4,7 +4,7 @@ plugin: gcp_compute projects: - acs-team-sandbox filters: - - name = collector-dev-* + - name = dev-* keyed_groups: # This will group the VMs by their labels, which means that on # creation, we can use a unique identifier to group VMs diff --git a/ansible/roles/create-all-vms/tasks/by-family.yml b/ansible/roles/create-all-vms/tasks/by-family.yml index e42fa3c412..51b750c70c 100644 --- a/ansible/roles/create-all-vms/tasks/by-family.yml +++ b/ansible/roles/create-all-vms/tasks/by-family.yml @@ -5,6 +5,7 @@ - set_fact: arch: "{{ item.0.value.arch | default('amd64') }}" + hashed_job_id: "{{ job_id | hash('md5') | truncate(16, True, '') }}" - set_fact: ibm_env: "{{ s390x.env }}" @@ -20,7 +21,7 @@ apply: environment: "{{ ibm_env | default({}) }}" vars: - vm_name: "{{ gcp_instance_prefix }}-{{ normalized_collection_method }}-{{ item.1 }}-{{ job_id }}" + vm_name: "{{ gcp_instance_prefix }}-{{ item.1 }}-{{ hashed_job_id }}" vm_project: "{{ item.0.value.project }}" vm_family: "{{ item.1 }}" vm_platform: "{{ item.0.key }}" diff --git a/ansible/roles/create-all-vms/tasks/main.yml b/ansible/roles/create-all-vms/tasks/main.yml index 20e0bfd289..ad1ecec854 100644 --- a/ansible/roles/create-all-vms/tasks/main.yml +++ b/ansible/roles/create-all-vms/tasks/main.yml @@ -1,8 +1,5 @@ --- -- set_fact: - normalized_collection_method: "{{ collection_method | default('any') | replace('core_bpf', 'core') }}" - - name: Create VMs From Family include_tasks: by-family.yml #