Move puppet repos to openstack_project::server

The zuul workers already have these repos installed by
install_puppet.sh (not for much longer but still).

Change-Id: I52bd7d48586492e8843b47bfb91043f28ea06b78
This commit is contained in:
Colleen Murphy 2017-04-27 20:20:55 +02:00
parent 0592f4cf1e
commit e4c872e5bf
2 changed files with 30 additions and 33 deletions

View File

@ -285,6 +285,36 @@ class openstack_project::server (
} }
} }
###########################################################
# Set up puppet repos
if ($::osfamily == 'Debian') {
# NOTE(pabelanger): Puppetlabs only support Ubuntu Trusty and below,
# anything greater will use the OS version of puppet.
if ($::operatingsystemrelease < '15.04') {
include ::apt
apt::source { 'puppetlabs':
location => 'http://apt.puppetlabs.com',
repos => 'main',
key => {
'id' =>'47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
'server' => 'pgp.mit.edu',
},
}
}
}
if ($::operatingsystem == 'CentOS') {
file { '/etc/yum.repos.d/puppetlabs.repo':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/centos7-puppetlabs.repo',
replace => true,
}
}
class { 'openstack_project::template': class { 'openstack_project::template':
certname => $certname, certname => $certname,
pin_puppet => $pin_puppet, pin_puppet => $pin_puppet,

View File

@ -13,37 +13,4 @@ class openstack_project::template (
$permit_root_login = 'no', $permit_root_login = 'no',
) { ) {
###########################################################
# Classes for all hosts
if ($::osfamily == 'Debian') {
# NOTE(pabelanger): Puppetlabs only support Ubuntu Trusty and below,
# anything greater will use the OS version of puppet.
if ($::operatingsystemrelease < '15.04') {
include ::apt
apt::source { 'puppetlabs':
location => 'http://apt.puppetlabs.com',
repos => 'main',
key => {
'id' =>'47B320EB4C7C375AA9DAE1A01054B7A24BD6EC30',
'server' => 'pgp.mit.edu',
},
}
}
}
if ($::operatingsystem == 'CentOS') {
file { '/etc/yum.repos.d/puppetlabs.repo':
ensure => present,
owner => 'root',
group => 'root',
mode => '0444',
source => 'puppet:///modules/openstack_project/centos7-puppetlabs.repo',
replace => true,
}
}
###########################################################
} }