Updates for puppet style guide
With the help of puppet-lint our base.pp manifest is now formatted correctly per the puppet style guide. Change-Id: I37de863b489bfd1b1a67b657a0749a5824ffe91d Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-on: https://review.openstack.org/13603 Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
ea4c66ba9d
commit
30353ebac4
@ -1,4 +1,7 @@
|
||||
class openstack_project::base($install_users=true, $certname=$fqdn) {
|
||||
class openstack_project::base(
|
||||
$certname = $::fqdn,
|
||||
$install_users = true
|
||||
) {
|
||||
include openstack_project::users
|
||||
include sudoers
|
||||
|
||||
@ -6,61 +9,67 @@ class openstack_project::base($install_users=true, $certname=$fqdn) {
|
||||
ensure => 'absent'
|
||||
}
|
||||
|
||||
package { "popularity-contest":
|
||||
package { 'popularity-contest':
|
||||
ensure => purged
|
||||
}
|
||||
|
||||
if ( $lsbdistcodename == "oneiric" ) {
|
||||
if ($::lsbdistcodename == 'oneiric') {
|
||||
include apt
|
||||
apt::ppa { 'ppa:git-core/ppa': }
|
||||
package { "git":
|
||||
ensure => latest,
|
||||
package { 'git':
|
||||
ensure => latest,
|
||||
require => Apt::Ppa['ppa:git-core/ppa']
|
||||
}
|
||||
} else {
|
||||
package { "git":
|
||||
package { 'git':
|
||||
ensure => present,
|
||||
}
|
||||
}
|
||||
|
||||
$packages = ["puppet",
|
||||
"python-setuptools",
|
||||
"python-virtualenv"]
|
||||
package { $packages: ensure => "present" }
|
||||
$packages = [
|
||||
'puppet',
|
||||
'python-setuptools',
|
||||
'python-virtualenv'
|
||||
]
|
||||
|
||||
package { $packages:
|
||||
ensure => 'present'
|
||||
}
|
||||
|
||||
if ($install_users) {
|
||||
package { ['byobu', 'emacs23-nox']:
|
||||
ensure => 'present'
|
||||
}
|
||||
|
||||
package { ["byobu", "emacs23-nox"]:
|
||||
ensure => "present"
|
||||
}
|
||||
|
||||
realize (
|
||||
User::Virtual::Localuser["mordred"],
|
||||
User::Virtual::Localuser["corvus"],
|
||||
User::Virtual::Localuser["soren"],
|
||||
User::Virtual::Localuser["linuxjedi"],
|
||||
User::Virtual::Localuser["devananda"],
|
||||
User::Virtual::Localuser["clarkb"],
|
||||
)
|
||||
realize (
|
||||
User::Virtual::Localuser['mordred'],
|
||||
User::Virtual::Localuser['corvus'],
|
||||
User::Virtual::Localuser['soren'],
|
||||
User::Virtual::Localuser['linuxjedi'],
|
||||
User::Virtual::Localuser['devananda'],
|
||||
User::Virtual::Localuser['clarkb'],
|
||||
)
|
||||
}
|
||||
|
||||
# Download and set up puppet apt repo
|
||||
exec { "download:puppetlabs-release-${lsbdistcodename}.deb":
|
||||
command => "/usr/bin/wget http://apt.puppetlabs.com/puppetlabs-release-${lsbdistcodename}.deb -O /root/puppetlabs-release-${lsbdistcodename}.deb",
|
||||
creates => "/root/puppetlabs-release-${lsbdistcodename}.deb",
|
||||
exec { "download:puppetlabs-release-$::{lsbdistcodename}.deb":
|
||||
command => "/usr/bin/wget http://apt.puppetlabs.com/puppetlabs-release-$::{lsbdistcodename}.deb -O /root/puppetlabs-release-$::{lsbdistcodename}.deb",
|
||||
creates => "/root/puppetlabs-release-$::{lsbdistcodename}.deb",
|
||||
}
|
||||
exec { "dpkg:puppetlabs-release-${lsbdistcodename}.deb":
|
||||
command => "/usr/bin/dpkg -i /root/puppetlabs-release-${lsbdistcodename}.deb",
|
||||
onlyif => "/usr/bin/test ! -f /etc/apt/sources.list.d/puppetlabs.list",
|
||||
require => Exec["download:puppetlabs-release-${lsbdistcodename}.deb"],
|
||||
exec { "dpkg:puppetlabs-release-$::{lsbdistcodename}.deb":
|
||||
command => "/usr/bin/dpkg -i /root/puppetlabs-release-$::{lsbdistcodename}.deb",
|
||||
onlyif => '/usr/bin/test ! -f /etc/apt/sources.list.d/puppetlabs.list',
|
||||
require => Exec["download:puppetlabs-release-$::{lsbdistcodename}.deb"],
|
||||
}
|
||||
|
||||
file { '/etc/puppet/puppet.conf':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
content => template('openstack_project/puppet.conf.erb'),
|
||||
replace => 'true',
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user