Correct puppet yum repo URL for git.o.o CentOS 7

Add a conditional checking for CentOS 7 and use a separate URL for
Puppet RPMs there. Also drop the unnecessary custom package resource
for CentOS 6 if installing on 7.

Change-Id: I30bb911320e731ef987b796cdd73dad7c1b7bbcd
This commit is contained in:
Jeremy Stanley 2015-09-15 18:43:58 +00:00
parent bf41610938
commit 3a81f0b066
3 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,7 @@
[puppetlabs-products]
name=Puppet Labs Products El 7 - $basearch
baseurl=http://yum.puppetlabs.com/el/7/products/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
enabled=1
gpgcheck=1
exclude=puppet-4* facter-3* puppetdb-3* puppetdb-terminus-3*

View File

@ -350,12 +350,21 @@ class openstack_project::template (
}
if ($::operatingsystem == 'CentOS') {
if ($::operatingsystemmajrelease == '6') {
$puppet_repo_source_path =
'puppet:///modules/openstack_project/centos6-puppetlabs.repo'
$custom_cgit = present
} elsif ($::operatingsystemmajrelease == '7') {
$puppet_repo_source_path =
'puppet:///modules/openstack_project/centos7-puppetlabs.repo'
$custom_cgit = absent
}
file { '/etc/yum.repos.d/puppetlabs.repo':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/centos-puppetlabs.repo',
source => $puppet_repo_source_path,
replace => true,
}
@ -363,7 +372,7 @@ class openstack_project::template (
# cloning performance, as discussed in redhat bz#1237395. Should
# be fixed in 6.8
file { '/etc/yum.repos.d/git-1237395.repo':
ensure => present,
ensure => $custom_cgit,
owner => 'root',
group => 'root',
mode => '0444',