diff --git a/modules/openstack_project/files/centos-puppetlabs.repo b/modules/openstack_project/files/centos6-puppetlabs.repo similarity index 100% rename from modules/openstack_project/files/centos-puppetlabs.repo rename to modules/openstack_project/files/centos6-puppetlabs.repo diff --git a/modules/openstack_project/files/centos7-puppetlabs.repo b/modules/openstack_project/files/centos7-puppetlabs.repo new file mode 100644 index 0000000000..c56e292509 --- /dev/null +++ b/modules/openstack_project/files/centos7-puppetlabs.repo @@ -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* diff --git a/modules/openstack_project/manifests/template.pp b/modules/openstack_project/manifests/template.pp index 0a4732a5d3..81ca5f9fac 100644 --- a/modules/openstack_project/manifests/template.pp +++ b/modules/openstack_project/manifests/template.pp @@ -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',