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:
parent
bf41610938
commit
3a81f0b066
7
modules/openstack_project/files/centos7-puppetlabs.repo
Normal file
7
modules/openstack_project/files/centos7-puppetlabs.repo
Normal 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*
|
@ -350,12 +350,21 @@ class openstack_project::template (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($::operatingsystem == 'CentOS') {
|
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':
|
file { '/etc/yum.repos.d/puppetlabs.repo':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0444',
|
mode => '0444',
|
||||||
source => 'puppet:///modules/openstack_project/centos-puppetlabs.repo',
|
source => $puppet_repo_source_path,
|
||||||
replace => true,
|
replace => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -363,7 +372,7 @@ class openstack_project::template (
|
|||||||
# cloning performance, as discussed in redhat bz#1237395. Should
|
# cloning performance, as discussed in redhat bz#1237395. Should
|
||||||
# be fixed in 6.8
|
# be fixed in 6.8
|
||||||
file { '/etc/yum.repos.d/git-1237395.repo':
|
file { '/etc/yum.repos.d/git-1237395.repo':
|
||||||
ensure => present,
|
ensure => $custom_cgit,
|
||||||
owner => 'root',
|
owner => 'root',
|
||||||
group => 'root',
|
group => 'root',
|
||||||
mode => '0444',
|
mode => '0444',
|
||||||
|
Loading…
Reference in New Issue
Block a user