public inbox for kdevops@lists.linux.dev
 help / color / mirror / Atom feed
From: cel@kernel.org
To: <kdevops@lists.linux.dev>
Cc: Anna Schumaker <anna@kernel.org>, Chuck Lever <chuck.lever@oracle.com>
Subject: [PATCH v2 3/3] codereadyrepo: Enable codeready-builder for AWS's RHEL 9
Date: Sat, 14 Dec 2024 12:01:39 -0500	[thread overview]
Message-ID: <20241214170139.253602-4-cel@kernel.org> (raw)
In-Reply-To: <20241214170139.253602-1-cel@kernel.org>

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 --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
-- 
2.47.1


      parent reply	other threads:[~2024-12-14 17:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-14 17:01 [PATCH v2 0/3] Recent fixes cel
2024-12-14 17:01 ` [PATCH v2 1/3] codereadyrepo: Refactor to prepare for more complex usage scenarios cel
2024-12-14 17:01 ` [PATCH v2 2/3] codereadyrepo: Repo name for Oracle Linux cel
2024-12-14 17:01 ` cel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241214170139.253602-4-cel@kernel.org \
    --to=cel@kernel.org \
    --cc=anna@kernel.org \
    --cc=chuck.lever@oracle.com \
    --cc=kdevops@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox