diff mbox series

[v2,3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9

Message ID 20241214170139.253602-4-cel@kernel.org (mailing list archive)
State New
Headers show
Series Recent fixes | expand

Commit Message

Chuck Lever Dec. 14, 2024, 5:01 p.m. UTC
From: Chuck Lever <chuck.lever@oracle.com>

When running the pynfs workflow with target nodes in AWS,
"make pynfs" fails with:

  Error: No matching repo to modify: codeready-builder-for-rhel-9-x86_64-rpms.

Adjust the logic in the codereadyrepo playbook to sketch in what
is needed for running the pynfs workflow in AWS.

Similar adjustments are likely to be necessary for other cloud
providers and for other distibutions.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 playbooks/roles/codereadyrepo/defaults/main.yml |  6 ++++++
 playbooks/roles/codereadyrepo/tasks/main.yml    | 13 +++++++++++++
 2 files changed, 19 insertions(+)
 create mode 100644 playbooks/roles/codereadyrepo/defaults/main.yml
diff mbox series

Patch

diff --git a/playbooks/roles/codereadyrepo/defaults/main.yml b/playbooks/roles/codereadyrepo/defaults/main.yml
new file mode 100644
index 000000000000..131f26ed510a
--- /dev/null
+++ b/playbooks/roles/codereadyrepo/defaults/main.yml
@@ -0,0 +1,6 @@ 
+# SPDX-License-Identifier GPL-2.0+
+---
+# Our sensible defaults for the codereadyrepo role.
+
+kdevops_enable_terraform: false
+kdevops_enable_guestfs: false
diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml
index b1d62eeb384c..b8ed44620deb 100644
--- a/playbooks/roles/codereadyrepo/tasks/main.yml
+++ b/playbooks/roles/codereadyrepo/tasks/main.yml
@@ -5,6 +5,7 @@ 
   when:
     - ansible_distribution == 'RedHat'
     - not devconfig_custom_yum_repofile
+    - kdevops_enable_guestfs
 
 - name: Select the Oracle Linux CodeReady Builder repo
   ansible.builtin.set_fact:
@@ -12,6 +13,7 @@ 
   when:
     - ansible_distribution == 'OracleLinux'
     - not devconfig_custom_yum_repofile
+    - kdevops_enable_guestfs
 
 - name: Select the CentOS CodeReady Builder repo
   ansible.builtin.set_fact:
@@ -19,6 +21,17 @@ 
   when:
     - ansible_distribution == 'CentOS'
     - not devconfig_custom_yum_repofile
+    - kdevops_enable_guestfs
+
+# Probably need one of these for each cloud provider
+- name: Select the AWS RHEL CodeReady Builder repo
+  ansible.builtin.set_fact:
+    codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-rhui-rpms"
+  when:
+    - ansible_distribution == 'RedHat'
+    - not devconfig_custom_yum_repofile
+    - kdevops_enable_terraform
+    - kdevops_terraform_provider == "aws"
 
 - name: Enable the selected CodeReady Builder repo
   become: true