From patchwork Tue Dec 10 19:29:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 13901964 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 1F10C23ED63 for ; Tue, 10 Dec 2024 19:29:26 +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=1733858968; cv=none; b=ebFGoQZtwzOhi1qeEzbZRmf7rcEkRoGT+QwauwyQPepS53xuXHjXeKQ3N/grIeBKjRwJovRMwLR0aTjH//98MBJsDxPZprzjZFcBVJZ+V/1fOvmf5hOVdDzdg+0y7JjIxtLpbeSeMiAvC9q4vGhoOIrqo9v4vFhSzUaA0KgoCLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733858968; c=relaxed/simple; bh=b9S4JVunghPiR+6tzx2tlN2hHBOwqxsCczl24wEW4xM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K7j/vkcuySXkPAqqG40lRNnuyupWQ9lnee15FDMlUr+TciAAM+tdjAcerH0Rdm7MInJd+eA8tuhZigtudxnn8iKY2CWPFIc8MAh5NRuGbk7tFFt5i9uJEm7y7iqNSPaOYW1RTQbtZ0IYWbG68uYaLnCwUELfgOAqrrh+gXwfDvs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EcwpxHCN; 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="EcwpxHCN" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28B94C4CEDF; Tue, 10 Dec 2024 19:29:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1733858966; bh=b9S4JVunghPiR+6tzx2tlN2hHBOwqxsCczl24wEW4xM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EcwpxHCN/OD4KwKWCG/i9TIXvd5nnr2Bcj+4a68q4KZDKHGk9EuiaWj3VdzYtYu2Y lX6f9aLww7TKE+fAwVGdFsfusnUQTKhW9XLybh+VYL+Iu2GbzvuvVD7dy8F0HOffs/ Cuz+bWklMgSnQiB+v3v6G3mo+6x6QwX0q2kbyI2NcBaV3eGa3efGh0v9Leefh43qh3 w1mvF/cr90V28SbqZRoU8pISnqsUCBUbkFHzFxmELgekIBovDcsAUyMuIzJR67F6f4 7d/8cD6f8ocuK8jSN5JZcUXxEf5KVcCulCkzcfLyfFV3cagxKr8iPhPeI/8XK/u6vX ZJ44c1NBB7jkw== From: cel@kernel.org To: Cc: Anna Schumaker , Chuck Lever Subject: [PATCH 5/6] playbooks: Add a Code Ready Builder role Date: Tue, 10 Dec 2024 14:29:18 -0500 Message-ID: <20241210192920.682914-6-cel@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241210192920.682914-1-cel@kernel.org> References: <20241210192920.682914-1-cel@kernel.org> Precedence: bulk X-Mailing-List: kdevops@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Chuck Lever Installing Code Ready Builder turns out to be complicated by the way the package is named on various cloud providers. Since there is more than one workflow that wants to install CRB, move the installation mechanism to its own role so that can be included in each workflow that might need it. Signed-off-by: Chuck Lever --- playbooks/roles/codereadyrepo/tasks/main.yml | 14 ++++++++++++++ .../fstests/tasks/install-deps/redhat/main.yml | 14 ++------------ .../roles/pynfs/tasks/install-deps/redhat/main.yml | 14 ++------------ .../sysbench/tasks/install-deps/redhat/main.yml | 14 ++------------ 4 files changed, 20 insertions(+), 36 deletions(-) create mode 100644 playbooks/roles/codereadyrepo/tasks/main.yml diff --git a/playbooks/roles/codereadyrepo/tasks/main.yml b/playbooks/roles/codereadyrepo/tasks/main.yml new file mode 100644 index 000000000000..71ad05c9d539 --- /dev/null +++ b/playbooks/roles/codereadyrepo/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- name: Enable the CodeReady repo + become: yes + ansible.builtin.command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms + when: + - ansible_distribution == 'RedHat' + - not devconfig_custom_yum_repofile + +- name: Enable the CodeReady repo + become: yes + ansible.builtin.command: /usr/bin/dnf config-manager --enable crb + when: + - ansible_distribution == 'CentOS' + - not devconfig_custom_yum_repofile diff --git a/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml b/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml index 1c238979d7d5..655afa3b9cc8 100644 --- a/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/fstests/tasks/install-deps/redhat/main.yml @@ -1,17 +1,7 @@ --- - 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 - when: - - ansible_distribution == 'RedHat' - - 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 + ansible.builtin.include_role: + name: codereadyrepo - name: Install epel-release if we're not on Fedora become: yes diff --git a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml index f4aee14c5430..93513c426263 100644 --- a/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml @@ -1,17 +1,7 @@ --- - 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 - when: - - ansible_distribution == 'RedHat' - - 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 + ansible.builtin.include_role: + name: codereadyrepo - name: Install build dependencies for pynfs become: yes diff --git a/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml b/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml index abe95cb0c5a0..4602d7e6cf5a 100644 --- a/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml +++ b/playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml @@ -1,17 +1,7 @@ --- - 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 - when: - - ansible_distribution == 'RedHat' - - 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 + ansible.builtin.include_role: + name: codereadyrepo - name: Install epel-release if we're not on Fedora become: yes