Use puppetlabs apt repo and pin puppet version.
In openstack_project::base use the Apt module to configure the upstream puppet labs apt repository and pin puppet to version 2.7.*. Change-Id: I0a09e02e3d26eb9452215e5bccef143487e9e58d Reviewed-on: https://review.openstack.org/14194 Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
e344a65fdb
commit
cfb6d326f4
@ -1,9 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
cat > /etc/apt/preferences.d/00-puppet.pref <<EOF
|
||||||
|
Package: puppet puppet-common puppetmaster puppetmaster-common
|
||||||
|
Pin: version 2.7*
|
||||||
|
Pin-Priority: 501
|
||||||
|
EOF
|
||||||
|
|
||||||
lsbdistcodename=`lsb_release -c -s`
|
lsbdistcodename=`lsb_release -c -s`
|
||||||
puppet_deb=puppetlabs-release-${lsbdistcodename}.deb
|
puppet_deb=puppetlabs-release-${lsbdistcodename}.deb
|
||||||
wget http://apt.puppetlabs.com/$puppet_deb -O $puppet_deb
|
wget http://apt.puppetlabs.com/$puppet_deb -O $puppet_deb
|
||||||
dpkg -i $puppet_deb
|
dpkg -i $puppet_deb
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y puppet git rubygems
|
apt-get install -y puppet git rubygems
|
||||||
|
|
||||||
|
@ -77,7 +77,6 @@ class jenkins::master(
|
|||||||
|
|
||||||
$packages = [
|
$packages = [
|
||||||
'python-babel',
|
'python-babel',
|
||||||
'wget',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
package { $packages:
|
package { $packages:
|
||||||
|
@ -41,7 +41,6 @@ class jenkins::slave($ssh_key, $sudo = false, $bare = false, $user = true) {
|
|||||||
"rubygems",
|
"rubygems",
|
||||||
"sqlite3",
|
"sqlite3",
|
||||||
"unzip",
|
"unzip",
|
||||||
"wget",
|
|
||||||
"xsltproc", # for building openstack docs
|
"xsltproc", # for building openstack docs
|
||||||
"xvfb", # for selenium tests
|
"xvfb", # for selenium tests
|
||||||
"pyflakes"]
|
"pyflakes"]
|
||||||
|
3
modules/openstack_project/files/00-puppet.pref
Normal file
3
modules/openstack_project/files/00-puppet.pref
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Package: puppet puppet-common puppetmaster puppetmaster-common
|
||||||
|
Pin: version 2.7*
|
||||||
|
Pin-Priority: 501
|
@ -2,6 +2,7 @@ class openstack_project::base(
|
|||||||
$certname = $::fqdn,
|
$certname = $::fqdn,
|
||||||
$install_users = true
|
$install_users = true
|
||||||
) {
|
) {
|
||||||
|
include apt
|
||||||
include openstack_project::users
|
include openstack_project::users
|
||||||
include sudoers
|
include sudoers
|
||||||
|
|
||||||
@ -14,7 +15,6 @@ class openstack_project::base(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($::lsbdistcodename == 'oneiric') {
|
if ($::lsbdistcodename == 'oneiric') {
|
||||||
include apt
|
|
||||||
apt::ppa { 'ppa:git-core/ppa': }
|
apt::ppa { 'ppa:git-core/ppa': }
|
||||||
package { 'git':
|
package { 'git':
|
||||||
ensure => latest,
|
ensure => latest,
|
||||||
@ -29,6 +29,7 @@ class openstack_project::base(
|
|||||||
$packages = [
|
$packages = [
|
||||||
'puppet',
|
'puppet',
|
||||||
'python-setuptools',
|
'python-setuptools',
|
||||||
|
'wget',
|
||||||
]
|
]
|
||||||
|
|
||||||
package { $packages:
|
package { $packages:
|
||||||
@ -57,15 +58,21 @@ class openstack_project::base(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Download and set up puppet apt repo
|
# Use upstream puppet and pin to version 2.7.*
|
||||||
exec { "download:puppetlabs-release-$::{lsbdistcodename}.deb":
|
apt::source { 'puppetlabs':
|
||||||
command => "/usr/bin/wget http://apt.puppetlabs.com/puppetlabs-release-$::{lsbdistcodename}.deb -O /root/puppetlabs-release-$::{lsbdistcodename}.deb",
|
location => 'http://apt.puppetlabs.com',
|
||||||
creates => "/root/puppetlabs-release-$::{lsbdistcodename}.deb",
|
repos => 'main',
|
||||||
|
key => '4BD6EC30',
|
||||||
|
key_server => 'pgp.mit.edu',
|
||||||
}
|
}
|
||||||
exec { "dpkg:puppetlabs-release-$::{lsbdistcodename}.deb":
|
|
||||||
command => "/usr/bin/dpkg -i /root/puppetlabs-release-$::{lsbdistcodename}.deb",
|
file { '/etc/apt/preferences.d/00-puppet.pref':
|
||||||
onlyif => '/usr/bin/test ! -f /etc/apt/sources.list.d/puppetlabs.list',
|
ensure => present,
|
||||||
require => Exec["download:puppetlabs-release-$::{lsbdistcodename}.deb"],
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0444',
|
||||||
|
source => 'puppet:///modules/openstack_project/00-puppet.pref',
|
||||||
|
replace => true,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/etc/puppet/puppet.conf':
|
file { '/etc/puppet/puppet.conf':
|
||||||
|
Loading…
Reference in New Issue
Block a user