All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Mayhew <smayhew@redhat.com>
To: cel@kernel.org
Cc: kdevops@lists.linux.dev, Chuck Lever <chuck.lever@oracle.com>
Subject: Re: [PATCH] pynfs: Enable codeready-builder in AWS
Date: Fri, 18 Oct 2024 18:14:48 -0400	[thread overview]
Message-ID: <ZxLd2Ht9muVBEZtQ@aion> (raw)
In-Reply-To: <20241018214454.1882565-1-cel@kernel.org>

On Fri, 18 Oct 2024, cel@kernel.org wrote:

> From: Chuck Lever <chuck.lever@oracle.com>
> 
> Running "make pynfs" against an AWS EC2 instance fails with:
> 
>   Error: No matching repo to modify: codeready-builder-for-rhel-9-x86_64-rpms.
> 
> Adjust the logic in
> playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml to try
> to sketch in what we might need for running the pynfs in the
> cloud.
> 
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  .../pynfs/tasks/install-deps/redhat/main.yml  | 51 ++++++++++++++-----
>  1 file changed, 38 insertions(+), 13 deletions(-)
> 
> diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
> index f4aee14c5430..5f377eed436f 100644
> --- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
> +++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml
> @@ -1,24 +1,49 @@
>  ---
> -- name: Enable the CodeReady repo
> -  become: yes
> -  command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
> +# name: Display all variables
> +# debug:
> +#   var=vars

Probably should remove the debugging stuff before merging.
> +
> +- name: Select the CodeReady repo to enable
> +  ansible.builtin.set_fact:
> +     nfsd_codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-rhui-rpms"
>    when:
> -    - ansible_distribution == 'RedHat'
> +    - kdevops_enable_terraform
> +    - kdevops_terraform_provider == "aws"
> +    - ansible_distribution == "RedHat"
> +
> +- name: Select the CodeReady repo to enable
> +  ansible.builtin.set_fact:
> +     nfsd_codeready_repo: "codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms"
> +  when:
> +    - not kdevops_enable_terraform
> +    - ansible_distribution == "RedHat"
> +    - not devconfig_custom_yum_repofile
> +
> +- name: Select the CodeReady repo to enable
> +  ansible.builtin.set_fact:
> +     nfsd_codeready_repo: "crb"
> +  when:
> +    - not kdevops_enable_terraform
> +    - ansible_distribution == "CentOS"
>      - not devconfig_custom_yum_repofile
>  
>  - name: Enable the CodeReady repo
> -  become: yes
> -  command: /usr/bin/dnf config-manager --enable crb
> -  when:
> -    - ansible_distribution == 'CentOS'
> -    - not devconfig_custom_yum_repofile
> +  become: true
> +  become_method: ansible.builtin.sudo
> +  ansible.builtin.command:
> +    argv:
> +      - "/usr/bin/dnf"
> +      - "config-manager"
> +      - "--enable"
> +      - "{{ nfsd_codeready_repo }}"

I'm not sure if this will work on my setups.  I use
devconfig_custom_yum_repofile in lieu of registering my systems because
I'm usually testing bits that aren't in any official repos yet.

So nfsd_codeready_repo will be unset when it gets to this command and
it'll just run 'dnf config-manager --enable'.

>  
>  - name: Install build dependencies for pynfs
> -  become: yes
> -  become_method: sudo
> -  yum:
> -    update_cache: yes
> +  become: true
> +  become_method: ansible.builtin.sudo
> +  ansible.builtin.yum:
> +    update_cache: true
>      name: "{{ packages }}"
> +    state: present
>    retries: 3
>    delay: 5
>    register: result
> -- 
> 2.46.1
> 
> 


  reply	other threads:[~2024-10-18 22:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 21:44 [PATCH] pynfs: Enable codeready-builder in AWS cel
2024-10-18 22:14 ` Scott Mayhew [this message]
2024-10-19 10:38 ` Scott Mayhew
2024-10-19 18:47   ` Chuck Lever III
2024-10-19 19:17     ` Chuck Lever III
2024-11-10 16:50       ` Chuck Lever III

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=ZxLd2Ht9muVBEZtQ@aion \
    --to=smayhew@redhat.com \
    --cc=cel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.