Skip to content

Commit

Permalink
Add real Candlepin repositories for Katello staging
Browse files Browse the repository at this point in the history
Candlepin now has its own release cycle and we'l always use the real
repositories. The version is now tracked in versions.yaml, just like
Pulpcore.
  • Loading branch information
ekohl authored and Odilhao committed Dec 7, 2023
1 parent fd88551 commit 1ec3902
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 9 deletions.
2 changes: 2 additions & 0 deletions roles/candlepin_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
candlepin_repositories_version: '4.3'
16 changes: 16 additions & 0 deletions roles/candlepin_repositories/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
- name: "Add Candlepin {{ candlepin_repositories_version }} repository"
yum_repository:
name: candlepin-repository
description: Candlepin {{ candlepin_repositories_version }}
baseurl: "https://yum.theforeman.org/candlepin/{{ candlepin_repositories_version }}/el{{ ansible_distribution_major_version }}/$basearch/"
gpgcheck: no
enabled: yes

- name: 'Enable pki-core module'
command: dnf module enable -y pki-core
# can't use the `dnf` module for modules without a default stream
# https://github.com/ansible/ansible/issues/56504
# https://github.com/ansible/ansible/issues/64852
args:
creates: /etc/dnf/modules.d/pki-core.module
2 changes: 2 additions & 0 deletions roles/forklift_versions/library/forklift_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def main():
'foreman_puppet_repositories_version': version['puppet'],
'pulpcore_repositories_version': version['pulpcore'],
}
if 'candlepin' in version:
forklift_vars['candlepin_repositories_version'] = version['candlepin']
ret = forklift_vars
break
else:
Expand Down
2 changes: 2 additions & 0 deletions roles/forklift_versions/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- foreman_repositories_version == '3.6'
- katello_repositories_version == '4.8'
- pulpcore_repositories_version == '3.22'
- candlepin_repositories_version is not defined

- name: "Include forklift_versions for 4.4 installs"
include_role:
Expand Down Expand Up @@ -50,6 +51,7 @@
- foreman_repositories_version is defined
- katello_repositories_version is defined
- pulpcore_repositories_version is defined
- candlepin_repositories_version is defined

- name: "Include forklift_versions for upgrades"
include_role:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,3 @@
gpgcheck: no
tags:
- packages

- name: 'Candlepin {{ katello_repositories_version }} Staging repository'
yum_repository:
name: candlepin-staging
description: "Candlepin {{ katello_repositories_version }} Staging Repository"
baseurl: "https://stagingyum.theforeman.org/candlepin/{{ katello_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
gpgcheck: no
tags:
- packages
6 changes: 6 additions & 0 deletions roles/katello_repositories/tasks/staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@
- name: 'Add Pulpcore repository'
include_role:
name: pulpcore_repositories

- name: 'Add Candlepin repository'
include_role:
name: candlepin_repositories
when:
- candlepin_repositories_version is defined
2 changes: 2 additions & 0 deletions vagrant/config/versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ installers:

- foreman: '3.9'
katello: '4.11'
candlepin: '4.3'
pulpcore: '3.39'
puppet: 7
boxes:
Expand All @@ -75,6 +76,7 @@ installers:

- foreman: 'nightly'
katello: 'nightly'
candlepin: '4.3'
pulpcore: '3.39'
puppet: 7
boxes:
Expand Down

0 comments on commit 1ec3902

Please sign in to comment.