Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/discover_latest_image/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ cifmw_discover_latest_image_debug: "{{ (ansible_verbosity | int) >= 2 | bool }}"
cifmw_discover_latest_image_base_url: https://cloud.centos.org/centos/{{ ansible_distribution_major_version }}-stream/x86_64/images/
cifmw_discover_latest_image_qcow_prefix: CentOS-Stream-GenericCloud-
cifmw_discover_latest_image_images_file: CHECKSUM
cifmw_discover_latest_image_prefix: "cifmw_discovered"
8 changes: 4 additions & 4 deletions roles/discover_latest_image/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

- name: Export facts accordingly
ansible.builtin.set_fact:
cifmw_discovered_image_name: "{{ discovered_image['data']['image_name'] }}"
cifmw_discovered_image_url: "{{ discovered_image['data']['image_url'] }}"
cifmw_discovered_hash: "{{ discovered_image['data']['hash'] }}"
cifmw_discovered_hash_algorithm: "{{ discovered_image['data']['hash_algorithm'] }}"
"{{ cifmw_discover_latest_image_prefix }}_image_name": "{{ discovered_image['data']['image_name'] }}"
"{{ cifmw_discover_latest_image_prefix }}_image_url": "{{ discovered_image['data']['image_url'] }}"
"{{ cifmw_discover_latest_image_prefix }}_hash": "{{ discovered_image['data']['hash'] }}"
"{{ cifmw_discover_latest_image_prefix }}_hash_algorithm": "{{ discovered_image['data']['hash_algorithm'] }}"
cacheable: true
1 change: 1 addition & 0 deletions roles/reproducer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ None
* `cifmw_reproducer_skip_fetch_repositories`: (Bool) Skip fetching repositories from zuul var and simply copy the code from the ansible controller. Defaults to `false`.
* `cifmw_reproducer_supported_hypervisor_os`: (List) List of supported hypervisor operating systems and their minimum version.
* `cifmw_reproducer_minimum_hardware_requirements`: (Dict) Define minimum hardware requirements for specific scenarios. Example below
* `cifmw_reproducer_computes_rhos_release_args`: (String) Arguments to use when installing rhos-release repos on compute nodes. Not defined by default, and `cifmw_repo_setup_rhos_release_args` is used instead.

### Advanced parameters
Those parameters shouldn't be used, unless the user is able to understand potential issues in their environment.
Expand Down
1 change: 1 addition & 0 deletions roles/reproducer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ cifmw_reproducer_supported_hypervisor_os:
minimum_version: 9
RedHat:
minimum_version: 9.3
cifmw_reproducer_discover_extra_vm_images: {}

# Allow to disable validations - user toggle this at their
# own risks!
Expand Down
2 changes: 2 additions & 0 deletions roles/reproducer/tasks/configure_computes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
- cifmw_repo_setup_rhos_release_rpm is defined
block:
- name: Get rhos-release and setup repos
vars:
_rhos_release_args_override: "{{ cifmw_reproducer_computes_rhos_release_args }}"
ansible.builtin.include_tasks: rhos_release.yml

- name: Create repositories on computes
Expand Down
17 changes: 17 additions & 0 deletions roles/reproducer/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,23 @@
ansible.builtin.import_role:
name: discover_latest_image

- name: Discover extra VM type images
tags:
- bootstrap
- bootstrap_layout
when:
- cifmw_reproducer_discover_extra_vm_images | default({}) | length > 0
ansible.builtin.include_role:
name: discover_latest_image
vars:
cifmw_discover_latest_image_base_url: "{{ item.value.base_url }}"
cifmw_discover_latest_image_qcow_prefix: "{{ item.value.qcow_prefix }}"
cifmw_discover_latest_image_images_file: "{{ item.value.images_file }}"
cifmw_discover_latest_image_prefix: "{{ item.value.prefix }}"
loop: "{{ cifmw_reproducer_discover_extra_vm_images | dict2items }}"
loop_control:
label: "{{ item.key }}"

- name: Load CI job environment
tags:
- bootstrap_layout
Expand Down
2 changes: 1 addition & 1 deletion roles/reproducer/tasks/rhos_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- name: Install repos
ansible.builtin.command:
cmd: "rhos-release {{ cifmw_repo_setup_rhos_release_args | default('rhel') }}"
cmd: "rhos-release {{ _rhos_release_args_override | default(cifmw_repo_setup_rhos_release_args) | default('rhel') }}"

- name: Run custom commands after rhos-release setup
ansible.builtin.command:
Expand Down
Loading