Skip to content

Commit

Permalink
Simplify VM naming scheme for testing (#1717)
Browse files Browse the repository at this point in the history
  • Loading branch information
Molter73 authored Jun 25, 2024
1 parent dee2f3f commit 92ab278
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ansible/roles/create-all-vms/tasks/by-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
- set_fact:
vm_hashable_name: "{{ item.1 }}-{{ job_id }}"
vm_image_short: "{{ item.1 | truncate(16, True, '') }}"
arch: "{{ item.0.value.arch | default('amd64') }}"

- set_fact:
vm_hashed_name: "{{ vm_hashable_name | hash('md5') | truncate(8, True, '') }}"

- set_fact:
arch: "{{ item.0.value.arch | default('amd64') }}"
vm_full_name: "{{ gcp_instance_prefix }}-{{ item.0.key }}-{{ vm_image_short }}-{{ normalized_collection_method }}-{{ vm_hashed_name }}"
vm_full_name: "{{ gcp_instance_prefix }}-{{ vm_image_short }}-{{ vm_hashed_name }}"
when: item.0.key != 'rhel-ppc64le'

- set_fact:
vm_full_name: "{{ gcp_instance_prefix }}-rhel-ppc64le-{{ vm_hashed_name }}"
when: item.0.key == 'rhel-ppc64le'

- set_fact:
ibm_env: "{{ s390x.env }}"
Expand Down

0 comments on commit 92ab278

Please sign in to comment.