Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow configuring the yum repo baseurl for Pulp repo #319

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@
#
# @param version
# The Pulpcore version to use
#
# @param yum_repo_baseurl
# The base URL for Yum repositories
class pulpcore::repo (
Pattern['^\d+\.\d+$'] $version = '3.28',
Stdlib::HTTPUrl $yum_repo_baseurl = 'https://yum.theforeman.org',
) {
$dist_tag = "el${facts['os']['release']['major']}"

$gpgcheck_enabled = $version ? {
'nightly' => '0',
default => '1',
}

$context = {
'version' => $version,
'dist_tag' => $dist_tag,
'version' => $version,
'dist_tag' => $dist_tag,
'yum_repo_baseurl' => $yum_repo_baseurl,
'gpgcheck_enabled' => $gpgcheck_enabled,
}

file { '/etc/yum.repos.d/pulpcore.repo':
Expand Down
10 changes: 5 additions & 5 deletions templates/repo.epp
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<%- | String[1] $version, String[1] $dist_tag | -%>
<%- | String[1] $version, String[1] $dist_tag, Stdlib::HTTPUrl $yum_repo_baseurl, String[1] $gpgcheck_enabled | -%>
[pulpcore]
name=Pulpcore <%= $version %>
baseurl=https://yum.theforeman.org/pulpcore/<%= $version %>/<%= $dist_tag %>/$basearch
baseurl=<%= $yum_repo_baseurl %>/pulpcore/<%= $version %>/<%= $dist_tag %>/$basearch
enabled=1
gpgcheck=1
gpgcheck=<%= $gpgcheck_enabled %>
gpgkey=https://yum.theforeman.org/pulpcore/<%= $version %>/GPG-RPM-KEY-pulpcore
module_hotfixes=1

[pulpcore-source]
name=Pulpcore <%= $version %> Source
baseurl=https://yum.theforeman.org/pulpcore/<%= $version %>/<%= $dist_tag %>/source
baseurl=<%= $yum_repo_baseurl %>/pulpcore/<%= $version %>/<%= $dist_tag %>/source
enabled=0
gpgcheck=1
gpgcheck=<%= $gpgcheck_enabled %>
gpgkey=https://yum.theforeman.org/pulpcore/<%= $version %>/GPG-RPM-KEY-pulpcore
module_hotfixes=1
Loading