Skip to content

Commit

Permalink
Fix for when ci_package_repo is set to master
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjfisher committed Nov 11, 2018
1 parent 9624672 commit 463d634
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
if $collectd::manage_repo {
$osfamily_downcase = downcase($facts['os']['family'])

$real_ci_package_repo = $collectd::ci_package_repo ? {
'master' => $collectd::ci_package_repo,
default => "collectd-${collectd::ci_package_repo}",
}

if defined("::collectd::repo::${osfamily_downcase}") {
require "::collectd::repo::${osfamily_downcase}"
} else {
Expand Down
2 changes: 1 addition & 1 deletion manifests/repo/debian.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

apt::source { 'collectd-ci':
location => 'https://pkg.ci.collectd.org/deb/',
repos => "collectd-${$::collectd::ci_package_repo}",
repos => $collectd::repo::real_ci_package_repo,
key => {
'id' => 'F806817DC3F5EA417F9FA2963994D24FB8543576',
'server' => $::collectd::package_keyserver,
Expand Down
2 changes: 1 addition & 1 deletion manifests/repo/redhat.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
yumrepo { 'collectd-ci':
ensure => present,
enabled => '1',
baseurl => "https://pkg.ci.collectd.org/rpm/collectd-${::collectd::ci_package_repo}/epel-${::operatingsystemmajrelease}-${::architecture}",
baseurl => "https://pkg.ci.collectd.org/rpm/${collectd::repo::real_ci_package_repo}/epel-${::operatingsystemmajrelease}-${::architecture}",
gpgkey => 'https://pkg.ci.collectd.org/pubkey.asc',
}

Expand Down

0 comments on commit 463d634

Please sign in to comment.