Skip to content

Commit

Permalink
Call rhos-release command only with rhos_release_args
Browse files Browse the repository at this point in the history
The reproducer role is configuring repositories twice, and one
of them has 'rhel' args hardcoded. This is a problem when we
need to configure a different release version since it end up
with duplicated repositories.
  • Loading branch information
viroel authored and openshift-merge-bot[bot] committed Jul 11, 2024
1 parent 1e197cb commit 23e69f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
9 changes: 1 addition & 8 deletions roles/reproducer/tasks/configure_computes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@
- cifmw_reproducer_compute_set_repositories | bool
- cifmw_repo_setup_rhos_release_rpm is defined
block:
- name: Get rhos-release
- name: Get rhos-release and setup repos
ansible.builtin.include_tasks: rhos_release.yml

- name: Configure rhos-release
register: _async_rhos_release
async: 120 # 2 minutes should be enough?
poll: 0
ansible.builtin.command:
cmd: "rhos-release {{ cifmw_repo_setup_rhos_release_args }}"

- name: Create repositories on computes
become: true
ansible.builtin.yum_repository:
Expand Down
2 changes: 1 addition & 1 deletion roles/reproducer/tasks/configure_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
when:
- cifmw_repo_setup_rhos_release_rpm is defined
block:
- name: Get rhos-release
- name: Get rhos-release and setup repos
ansible.builtin.import_tasks: rhos_release.yml

- name: Create bundle for CRC
Expand Down
7 changes: 5 additions & 2 deletions roles/reproducer/tasks/rhos_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
state: present
disable_gpg_check: true

- name: Enable RHEL repos
- name: Install repos
register: _async_rhos_release
async: 120 # 2 minutes should be enough?
poll: 0
ansible.builtin.command:
cmd: "rhos-release rhel"
cmd: "rhos-release {{ cifmw_repo_setup_rhos_release_args | default('rhel') }}"

0 comments on commit 23e69f3

Please sign in to comment.