
Fixes an issue where puppet.conf was only getting created on Ubuntu machines. We actually need this file on *all* slaves. Change-Id: I2d9810acd1e834853b00a9ebd1f0a1e5406a6ca9 Reviewed-on: https://review.openstack.org/23573 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
92 lines
2.0 KiB
Puppet
92 lines
2.0 KiB
Puppet
# == Class: openstack_project::base
|
|
#
|
|
class openstack_project::base(
|
|
$certname = $::fqdn,
|
|
$install_users = true
|
|
) {
|
|
if ($::operatingsystem == 'Ubuntu') {
|
|
include apt
|
|
}
|
|
include openstack_project::params
|
|
include openstack_project::users
|
|
include sudoers
|
|
|
|
file { '/etc/profile.d/Z98-byobu.sh':
|
|
ensure => absent,
|
|
}
|
|
|
|
package { 'popularity-contest':
|
|
ensure => purged,
|
|
}
|
|
|
|
if ($::lsbdistcodename == 'oneiric') {
|
|
apt::ppa { 'ppa:git-core/ppa': }
|
|
package { 'git':
|
|
ensure => latest,
|
|
require => Apt::Ppa['ppa:git-core/ppa'],
|
|
}
|
|
} else {
|
|
package { 'git':
|
|
ensure => present,
|
|
}
|
|
}
|
|
|
|
package { $::openstack_project::params::packages:
|
|
ensure => present
|
|
}
|
|
|
|
include pip
|
|
package { 'virtualenv':
|
|
ensure => latest,
|
|
provider => pip,
|
|
require => Class['pip'],
|
|
}
|
|
|
|
if ($install_users) {
|
|
package { $::openstack_project::params::user_packages:
|
|
ensure => present
|
|
}
|
|
|
|
realize (
|
|
User::Virtual::Localuser['mordred'],
|
|
User::Virtual::Localuser['corvus'],
|
|
User::Virtual::Localuser['soren'],
|
|
User::Virtual::Localuser['linuxjedi'],
|
|
User::Virtual::Localuser['clarkb'],
|
|
User::Virtual::Localuser['fungi'],
|
|
)
|
|
}
|
|
|
|
# Use upstream puppet and pin to version 2.7.*
|
|
if ($::operatingsystem == 'Ubuntu') {
|
|
apt::source { 'puppetlabs':
|
|
location => 'http://apt.puppetlabs.com',
|
|
repos => 'main',
|
|
key => '4BD6EC30',
|
|
key_server => 'pgp.mit.edu',
|
|
}
|
|
|
|
file { '/etc/apt/preferences.d/00-puppet.pref':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0444',
|
|
source => 'puppet:///modules/openstack_project/00-puppet.pref',
|
|
replace => true,
|
|
}
|
|
|
|
}
|
|
|
|
file { '/etc/puppet/puppet.conf':
|
|
ensure => present,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0444',
|
|
content => template('openstack_project/puppet.conf.erb'),
|
|
replace => true,
|
|
}
|
|
|
|
}
|
|
|
|
# vim:sw=2:ts=2:expandtab:textwidth=79
|