Skip to content

Commit

Permalink
Add staging repositories from stagingyum.theforeman.org that come fro…
Browse files Browse the repository at this point in the history
…m Copr
  • Loading branch information
ehelms committed Aug 30, 2023
1 parent b2946fc commit 42eb6a8
Show file tree
Hide file tree
Showing 11 changed files with 140 additions and 64 deletions.
1 change: 1 addition & 0 deletions roles/foreman_client_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ foreman_client_repositories_environment: release
foreman_client_repositories_dists:
RedHat: el
Fedora: fc
foreman_client_repositories_staging_source: koji
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
- name: 'Foreman {{ foreman_client_repositories_version }} Client Staging Repository'
yum_repository:
name: foreman-client-koji
description: "Foreman {{ foreman_client_repositories_version }} Client Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-client-{{ foreman_client_repositories_version }}/{{ foreman_client_repositories_dists[ansible_os_family] }}{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: 'Foreman {{ foreman_client_repositories_version }} Client Staging Repository'
yum_repository:
name: foreman-client-staging
description: "Foreman {{ foreman_client_repositories_version }} Client Staging Repository"
baseurl: "https://stagingyum.theforeman.org/client/{{ foreman_client_repositories_version }}/{{ foreman_client_repositories_dists[ansible_os_family] }}{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages
14 changes: 7 additions & 7 deletions roles/foreman_client_repositories/tasks/staging_repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
tags:
- packages

- name: 'Foreman {{ foreman_client_repositories_version }} Client Staging Repository'
yum_repository:
name: foreman-client-koji
description: "Foreman {{ foreman_client_repositories_version }} Client Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-client-{{ foreman_client_repositories_version }}/{{ foreman_client_repositories_dists[ansible_os_family] }}{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no
- when: foreman_client_repositories_staging_source == 'koji'
ansible.builtin.include_tasks:
file: _koji_staging_repos.yml

- when: foreman_client_repositories_staging_source == 'stagingyum'
ansible.builtin.include_tasks:
file: _stagingyum_staging_repos.yml

- include_tasks: qpid.yml
when:
Expand Down
1 change: 1 addition & 0 deletions roles/foreman_repositories/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
foreman_repositories_version: nightly
foreman_repositories_environment: release
foreman_repositories_plugins: true
foreman_repositories_staging_source: koji
34 changes: 34 additions & 0 deletions roles/foreman_repositories/tasks/_koji_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
- name: 'Foreman {{ foreman_repositories_version }} Koji repository'
yum_repository:
name: foreman-koji
description: "Foreman {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Plugins Koji repository'
yum_repository:
name: foreman-plugins-koji
state: "{{ foreman_repositories_plugins | ternary('present', 'absent') }}"
description: "Foreman Plugins {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-plugins-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- foreman-koji
- foreman-plugins-koji
tags:
- packages
when:
- foreman_repositories_version != 'nightly'
- foreman_repositories_version is version('3.1', '<=')
20 changes: 20 additions & 0 deletions roles/foreman_repositories/tasks/_stagingyum_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: 'Foreman {{ foreman_repositories_version }} Staging repository'
yum_repository:
name: foreman-staging
description: "Foreman {{ foreman_repositories_version }} Staging Repository"
baseurl: "https://stagingyum.theforeman.org/foreman/{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Plugins Staging repository'
yum_repository:
name: foreman-plugins-staging
description: "Foreman {{ foreman_repositories_version }} Plugins Staging Repository"
baseurl: "https://stagingyum.theforeman.org/plugins/{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages
38 changes: 6 additions & 32 deletions roles/foreman_repositories/tasks/redhat_staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,13 @@
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Koji repository'
yum_repository:
name: foreman-koji
description: "Foreman {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages

- name: 'Foreman {{ foreman_repositories_version }} Plugins Koji repository'
yum_repository:
name: foreman-plugins-koji
state: "{{ foreman_repositories_plugins | ternary('present', 'absent') }}"
description: "Foreman Plugins {{ foreman_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/foreman-plugins-{{ foreman_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
gpgcheck: no
tags:
- packages
- when: foreman_repositories_staging_source == 'koji'
ansible.builtin.include_tasks:
file: _koji_staging_repos.yml

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- foreman-koji
- foreman-plugins-koji
tags:
- packages
when:
- foreman_repositories_version != 'nightly'
- foreman_repositories_version is version('3.1', '<=')
- when: foreman_repositories_staging_source == 'stagingyum'
ansible.builtin.include_tasks:
file: _stagingyum_staging_repos.yml

- name: 'Enable foreman:el8 module'
command: dnf module enable -y foreman:el8
Expand Down
27 changes: 27 additions & 0 deletions roles/katello_repositories/tasks/_koji_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
- name: 'Katello {{ katello_repositories_version }} Koji repository'
yum_repository:
name: katello-koji
description: "Katello {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/katello/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Candlepin Koji repository'
yum_repository:
name: candlepin-koji
description: "Candlepin {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/candlepin/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- katello-koji
- candlepin-koji
when:
- katello_repositories_version != 'nightly'
- katello_repositories_version is version('4.2', '<=')
20 changes: 20 additions & 0 deletions roles/katello_repositories/tasks/_stagingyum_staging_repos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
- name: 'Katello {{ katello_repositories_version }} Staging repository'
yum_repository:
name: katello-staging
description: "Katello {{ katello_repositories_version }} Staging Repository"
baseurl: "https://stagingyum.theforeman.org/katello/{{ katello_repositories_version }}/el{{ ansible_distribution_major_version }}/x86_64/"
priority: "1"
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/"
priority: "1"
gpgcheck: no
tags:
- packages
31 changes: 6 additions & 25 deletions roles/katello_repositories/tasks/staging_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,13 @@
name: katello-repos
state: absent

- name: 'Katello {{ katello_repositories_version }} Koji repository'
yum_repository:
name: katello-koji
description: "Katello {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/katello/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no
- when: katello_repositories_staging_source == 'koji'
ansible.builtin.include_tasks:
file: _koji_staging_repos.yml

- name: 'Candlepin Koji repository'
yum_repository:
name: candlepin-koji
description: "Candlepin {{ katello_repositories_version }} Koji Repository"
baseurl: "http://koji.katello.org/releases/yum/katello-{{ katello_repositories_version }}/candlepin/el{{ ansible_distribution_major_version }}/x86_64/"
priority: '1'
gpgcheck: no

- name: 'Set module_hotfixes=1'
lineinfile:
path: "/etc/yum.repos.d/{{ item }}.repo"
line: module_hotfixes=1
loop:
- katello-koji
- candlepin-koji
when:
- katello_repositories_version != 'nightly'
- katello_repositories_version is version('4.2', '<=')
- when: katello_repositories_staging_source == 'stagingyum'
ansible.builtin.include_tasks:
file: _stagingyum_staging_repos.yml

- name: 'Enable katello:el8 module'
command: dnf module enable -y katello:el8
Expand Down

0 comments on commit 42eb6a8

Please sign in to comment.