diff --git a/roles/candlepin_repositories/defaults/main.yml b/roles/candlepin_repositories/defaults/main.yml new file mode 100644 index 000000000..2f099db7b --- /dev/null +++ b/roles/candlepin_repositories/defaults/main.yml @@ -0,0 +1,2 @@ +--- +candlepin_repositories_version: '4.3' diff --git a/roles/candlepin_repositories/tasks/main.yml b/roles/candlepin_repositories/tasks/main.yml new file mode 100644 index 000000000..296f6c9ba --- /dev/null +++ b/roles/candlepin_repositories/tasks/main.yml @@ -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 diff --git a/roles/forklift_versions/library/forklift_versions.py b/roles/forklift_versions/library/forklift_versions.py index b53d59212..18993335f 100644 --- a/roles/forklift_versions/library/forklift_versions.py +++ b/roles/forklift_versions/library/forklift_versions.py @@ -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: @@ -93,10 +95,6 @@ def main(): for version in reversed(versions['installers']): if not scenario_os in version['boxes']: continue - # this is a hack, to be removed once all Katello versions support EL8 in the same manner Foreman does - # aka: when 4.4 is released - if scenario == 'katello' and (scenario_os.startswith('centos8') or scenario_os.startswith('almalinux8')) and version_sort_key(version[scenario]) < version_sort_key('4.0'): - continue if version_sort_key(version[scenario]) <= version_sort_key(scenario_version): possible_versions.add(version[scenario]) possible_versions = list(sorted(possible_versions, key=version_sort_key, reverse=True)) diff --git a/roles/forklift_versions/molecule/default/verify.yml b/roles/forklift_versions/molecule/default/verify.yml index ae48a5a75..77a76c4a0 100644 --- a/roles/forklift_versions/molecule/default/verify.yml +++ b/roles/forklift_versions/molecule/default/verify.yml @@ -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: @@ -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: diff --git a/roles/katello_repositories/tasks/_stagingyum_staging_repos.yml b/roles/katello_repositories/tasks/_stagingyum_staging_repos.yml index 265ea8641..9aa9152bf 100644 --- a/roles/katello_repositories/tasks/_stagingyum_staging_repos.yml +++ b/roles/katello_repositories/tasks/_stagingyum_staging_repos.yml @@ -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 diff --git a/roles/katello_repositories/tasks/staging_repos.yml b/roles/katello_repositories/tasks/staging_repos.yml index 8b3d9d0ab..364f75604 100644 --- a/roles/katello_repositories/tasks/staging_repos.yml +++ b/roles/katello_repositories/tasks/staging_repos.yml @@ -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 diff --git a/vagrant/config/versions.yaml b/vagrant/config/versions.yaml index c3b909521..6f31d3e2b 100644 --- a/vagrant/config/versions.yaml +++ b/vagrant/config/versions.yaml @@ -65,6 +65,7 @@ installers: - foreman: '3.9' katello: '4.11' + candlepin: '4.3' pulpcore: '3.39' puppet: 7 boxes: @@ -75,6 +76,7 @@ installers: - foreman: 'nightly' katello: 'nightly' + candlepin: '4.3' pulpcore: '3.39' puppet: 7 boxes: