Skip to content

Commit 6779105

Browse files
committed
playbooks: Add a Code Ready Builder role
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 <[email protected]>
1 parent 6d03ad7 commit 6779105

File tree

4 files changed

+20
-36
lines changed
  • playbooks/roles

4 files changed

+20
-36
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
- name: Enable the CodeReady repo
3+
become: yes
4+
ansible.builtin.command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
5+
when:
6+
- ansible_distribution == 'RedHat'
7+
- not devconfig_custom_yum_repofile
8+
9+
- name: Enable the CodeReady repo
10+
become: yes
11+
ansible.builtin.command: /usr/bin/dnf config-manager --enable crb
12+
when:
13+
- ansible_distribution == 'CentOS'
14+
- not devconfig_custom_yum_repofile

playbooks/roles/fstests/tasks/install-deps/redhat/main.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
---
22
- name: Enable the CodeReady repo
3-
become: yes
4-
command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
5-
when:
6-
- ansible_distribution == 'RedHat'
7-
- not devconfig_custom_yum_repofile
8-
9-
- name: Enable the CodeReady repo
10-
become: yes
11-
command: /usr/bin/dnf config-manager --enable crb
12-
when:
13-
- ansible_distribution == 'CentOS'
14-
- not devconfig_custom_yum_repofile
3+
ansible.builtin.include_role:
4+
name: codereadyrepo
155

166
- name: Install epel-release if we're not on Fedora
177
become: yes

playbooks/roles/pynfs/tasks/install-deps/redhat/main.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
---
22
- name: Enable the CodeReady repo
3-
become: yes
4-
command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
5-
when:
6-
- ansible_distribution == 'RedHat'
7-
- not devconfig_custom_yum_repofile
8-
9-
- name: Enable the CodeReady repo
10-
become: yes
11-
command: /usr/bin/dnf config-manager --enable crb
12-
when:
13-
- ansible_distribution == 'CentOS'
14-
- not devconfig_custom_yum_repofile
3+
ansible.builtin.include_role:
4+
name: codereadyrepo
155

166
- name: Install build dependencies for pynfs
177
become: yes

playbooks/roles/sysbench/tasks/install-deps/redhat/main.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
---
22
- name: Enable the CodeReady repo
3-
become: yes
4-
command: /usr/bin/dnf config-manager --enable codeready-builder-for-rhel-{{ ansible_distribution_major_version }}-{{ ansible_architecture }}-rpms
5-
when:
6-
- ansible_distribution == 'RedHat'
7-
- not devconfig_custom_yum_repofile
8-
9-
- name: Enable the CodeReady repo
10-
become: yes
11-
command: /usr/bin/dnf config-manager --enable crb
12-
when:
13-
- ansible_distribution == 'CentOS'
14-
- not devconfig_custom_yum_repofile
3+
ansible.builtin.include_role:
4+
name: codereadyrepo
155

166
- name: Install epel-release if we're not on Fedora
177
become: yes

0 commit comments

Comments
 (0)