From patchwork Fri Oct 18 21:44:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13842445 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6367519007E for ; Fri, 18 Oct 2024 21:44:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729287897; cv=none; b=CYX+FoI4ZHrzm6XbdmrhEU/4pRu0nJhaz5J3qMZKY9OvVQpxl354nRMqU9Ud9vgdz/1ub1HwMz8/NdvH+j+xIpm87sx4qnPF+Bb5yATEtfONNoRMUAWbq/UY2i+beGyEmVmlPxrJ93o2vAtCiSmW1kFrwWT4rdx/SPIBNQYzb9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729287897; c=relaxed/simple; bh=v8oCY7pOxCbg3P2jXF1a8qqrLLtRvHpN49yyVJj2dRk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=u3HjaqDYK420L5Z0RHqaNqxMHRgSX0ZAPDBlSmY46wQBIJflJof+0XfDIH57CqJxA5nio7gDPwz8Y+Bgm1MBmqlbEUV1ED3Xh/aAujQGlaSuGSn5euwv2erfp070bfVPKseaPQkuoZyFsjEtk96kEC35TqDQeveSTGFQH2FQRhk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZEQhoqjQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZEQhoqjQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B25D8C4CEC5; Fri, 18 Oct 2024 21:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1729287897; bh=v8oCY7pOxCbg3P2jXF1a8qqrLLtRvHpN49yyVJj2dRk=; h=From:To:Cc:Subject:Date:From; b=ZEQhoqjQaKkAQ3VauOZsweYt6H8i8TJYoic6OvWIW3DgtY17bQ2U6riaYVN4WORMM bPka9JfTlgxgjwLfOtWLwy25057LwNZdmRnMq1ZSqGaMtxPny0lsVoQNtLuLI35eY/ hM3kDiDY6U0y2bxpFsv+cN+O9mSkBEe7DoIEXd+fl4pfcPTlrsG3fok/hNhPIlaMhT guSQpkMlhCDmlkJM236EbIgwukFP3CjOYtpswHJEG9akyUBzEu4gRLWkdpDXb83o7H 0pC8ipoMbm4+ank2Cl33SEBnfJNjkjeYVZVsYQjtlxylizYqXziyUVSKPkhdb8qCkU fXEEhwcc6tnvg== From: cel@kernel.org To: Cc: Chuck Lever Subject: [PATCH] pynfs: Enable codeready-builder in AWS Date: Fri, 18 Oct 2024 17:44:54 -0400 Message-ID: <20241018214454.1882565-1-cel@kernel.org> X-Mailer: git-send-email 2.46.1 Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever 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 --- .../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 + +- 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 }}" - 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