Skip to content

Commit

Permalink
Reword excluded vm list, without power constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
Stringy committed May 22, 2024
1 parent 7d516b8 commit eda4609
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
12 changes: 7 additions & 5 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ runtime_socket: /var/run/docker.sock
redhat_username: "{{ lookup('env', 'REDHAT_USERNAME', default='') }}"
redhat_password: "{{ lookup('env', 'REDHAT_PASSWORD', default='') }}"

excluded_pairs:
# e.g. - ['ubuntu-1804-lts', 'core_bpf']
- ['rhel-8.8-05102023', 'ebpf']
- ['rhel-86-05162022', 'core_bpf']
excluded_vms:
# Specify, family, image, or platform
# e.g.
# - ubuntu-1804-lts
# - rhel-arm64
# - rhcos-413-86-202303151429-0-gcp-x86-64
-

virtual_machines:
rhel:
Expand Down Expand Up @@ -49,7 +52,6 @@ virtual_machines:
arch: ppc64le
ssh_key_file: "~/.ssh/acs-ppc64le-rsa.prv"
images:
- rhel-86-05162022
- rhel-8.8-05102023

rhel-sap:
Expand Down
17 changes: 4 additions & 13 deletions ansible/roles/create-vm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
---

#
# Exclusion precedence:
# 1. ppc64le is the only platform allowed to run eBPF
# 2. specific exclusions defined group_vars/all.yml
#
# Consider each set_fact to be a rule, and subsequent rules are only
# processed if the previous rules do not exclude this combination of
# vm and collection method.
#
- name: Check eBPF excluded
- name: Check platform excluded
set_fact:
excluded: "{{ test_platform != 'rhel-ppc64le' and vm_collection_method == 'ebpf' }}"
excluded: "{{ test_platform in excluded_vms }}"

- name: Check family excluded
set_fact:
excluded: "{{ [vm_family, vm_collection_method] in excluded_pairs }}"
excluded: "{{ vm_family in excluded_vms }}"
when: vm_image is not defined and excluded == false

- name: Check image excluded
set_fact:
excluded: "{{ [vm_image, vm_collection_method] in excluded_pairs }}"
excluded: "{{ vm_image in excluded_vms }}"
when: vm_image is defined and excluded == false

- block:
Expand Down

0 comments on commit eda4609

Please sign in to comment.