summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-08-06 19:36:40 +0200
committermh <mh@immerda.ch>2010-08-06 19:36:40 +0200
commit7d904841c15873db9ac1745f659d8464fd45f41a (patch)
tree991567a2557fa59b6502d2c0bcf87f6c786c5c34
parent6bd681ab05072964efc95ecfe2816e371e45a862 (diff)
codestyle - whitespace
Only code style and whitespace formatting issues. Everything should no be in ligne.
-rw-r--r--manifests/base.pp34
-rw-r--r--manifests/centos.pp16
-rw-r--r--manifests/cron.pp10
-rw-r--r--manifests/cron/base.pp32
-rw-r--r--manifests/cron/linux.pp22
-rw-r--r--manifests/cron/openbsd.pp34
-rw-r--r--manifests/debian.pp29
-rw-r--r--manifests/gentoo.pp20
-rw-r--r--manifests/init.pp28
-rw-r--r--manifests/linux.pp40
-rw-r--r--manifests/openbsd.pp42
-rw-r--r--manifests/puppetmaster.pp20
-rw-r--r--manifests/puppetmaster/base.pp52
-rw-r--r--manifests/puppetmaster/centos.pp16
-rw-r--r--manifests/puppetmaster/checklastrun.pp22
-rw-r--r--manifests/puppetmaster/cluster.pp4
-rw-r--r--manifests/puppetmaster/cluster/base.pp8
-rw-r--r--manifests/puppetmaster/debian.pp5
-rw-r--r--manifests/puppetmaster/hasdb.pp26
-rw-r--r--manifests/puppetmaster/hasdb/mysql.pp46
-rw-r--r--manifests/puppetmaster/linux.pp35
-rw-r--r--manifests/puppetmaster/package.pp10
-rw-r--r--manifests/puppetmaster/package/base.pp14
-rw-r--r--manifests/puppetmaster/package/centos.pp10
-rw-r--r--manifests/puppetmaster/passenger.pp32
-rw-r--r--manifests/puppetmaster/storeconfigs.pp8
26 files changed, 290 insertions, 325 deletions
diff --git a/manifests/base.pp b/manifests/base.pp
index ebf4d7a..598fb9e 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -1,25 +1,23 @@
class puppet::base {
- case $puppet_config {
- '': { $puppet_config = '/etc/puppet/puppet.conf' }
- }
+ if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' }
- file { 'puppet_config':
- path => "$puppet_config",
- source => [ "puppet://$server/modules/site-puppet/client/${fqdn}/puppet.conf",
+ file { 'puppet_config':
+ path => "$puppet_config",
+ source => [ "puppet://$server/modules/site-puppet/client/${fqdn}/puppet.conf",
"puppet://$server/modules/site-puppet/client/puppet.conf.$operatingsystem",
"puppet://$server/modules/site-puppet/client/puppet.conf",
"puppet://$server/modules/puppet/client/puppet.conf.$operatingsystem",
"puppet://$server/modules/puppet/client/puppet.conf" ],
- notify => Service[puppet],
- # if puppetmasterd is deployed by apache2/passenger it needs to read puppet.conf
- # therefore it must be readable by puppet
- owner => puppet, group => 0, mode => 600;
- }
- service{'puppet':
- ensure => running,
- enable => true,
- hasstatus => true,
- hasrestart => true,
- pattern => puppetd,
- }
+ notify => Service[puppet],
+ # if puppetmasterd is deployed by apache2/passenger it needs to read puppet.conf
+ # therefore it must be readable by puppet
+ owner => puppet, group => 0, mode => 600;
+ }
+ service{'puppet':
+ ensure => running,
+ enable => true,
+ hasstatus => true,
+ hasrestart => true,
+ pattern => puppetd,
+ }
}
diff --git a/manifests/centos.pp b/manifests/centos.pp
index 87b4fbc..e0ba1f1 100644
--- a/manifests/centos.pp
+++ b/manifests/centos.pp
@@ -1,10 +1,10 @@
class puppet::centos inherits puppet::linux {
- file{'/etc/sysconfig/puppet':
- source => [ "puppet://$server/modules/site-puppet/sysconfig/${fqdn}/puppet",
- "puppet://$server/modules/site-puppet/sysconfig/${domain}/puppet",
- "puppet://$server/modules/site-puppet/sysconfig/puppet",
- "puppet://$server/modules/puppet/sysconfig/puppet" ],
- notify => Service[puppet],
- owner => root, group => 0, mode => 0644;
- }
+ file{'/etc/sysconfig/puppet':
+ source => [ "puppet://$server/modules/site-puppet/sysconfig/${fqdn}/puppet",
+ "puppet://$server/modules/site-puppet/sysconfig/${domain}/puppet",
+ "puppet://$server/modules/site-puppet/sysconfig/puppet",
+ "puppet://$server/modules/puppet/sysconfig/puppet" ],
+ notify => Service[puppet],
+ owner => root, group => 0, mode => 0644;
+ }
}
diff --git a/manifests/cron.pp b/manifests/cron.pp
index 9bce6a7..8d41174 100644
--- a/manifests/cron.pp
+++ b/manifests/cron.pp
@@ -1,9 +1,9 @@
# manifests/cron.pp
class puppet::cron inherits puppet {
- case $kernel {
- linux: { include puppet::cron::linux }
- openbsd: { include puppet::cron::openbsd }
- default: { include puppet::cron::base }
- }
+ case $kernel {
+ linux: { include puppet::cron::linux }
+ openbsd: { include puppet::cron::openbsd }
+ default: { include puppet::cron::base }
+ }
}
diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp
index 6688c5e..2289a3c 100644
--- a/manifests/cron/base.pp
+++ b/manifests/cron/base.pp
@@ -1,23 +1,23 @@
# manifests/cron/base.pp
class puppet::cron::base inherits puppet::base {
- Service['puppet']{
- enable => false,
- }
+ Service['puppet']{
+ enable => false,
+ }
- case $operatingsystem {
- debian,openbsd,ubuntu: {
- #it's already disabled
- }
- default: {
- Service['puppet']{
- hasstatus => false,
- }
- }
+ case $operatingsystem {
+ debian,openbsd,ubuntu: {
+ #it's already disabled
}
- exec{'stop_puppet':
- command => 'kill `cat /var/run/puppet/puppetd.pid`',
- onlyif => 'test -f /var/run/puppet/puppetd.pid',
- require => Service['puppet'],
+ default: {
+ Service['puppet']{
+ hasstatus => false,
+ }
}
+ }
+ exec{'stop_puppet':
+ command => 'kill `cat /var/run/puppet/puppetd.pid`',
+ onlyif => 'test -f /var/run/puppet/puppetd.pid',
+ require => Service['puppet'],
+ }
}
diff --git a/manifests/cron/linux.pp b/manifests/cron/linux.pp
index 75f11a3..c13c10a 100644
--- a/manifests/cron/linux.pp
+++ b/manifests/cron/linux.pp
@@ -1,18 +1,12 @@
# manifests/cron/linux.pp
class puppet::cron::linux inherits puppet::linux {
- include puppet::cron::base
- case $puppet_config {
- '': { $puppet_config = '/etc/puppet/puppet.conf' }
- }
-
- case $puppet_crontime {
- '': { $puppet_crontime = '0,30 * * * *' }
- }
+ include puppet::cron::base
+ if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' }
+
+ if !$puppet_crontime { $puppet_crontime = '0,30 * * * *' }
-
- File['/etc/cron.d/puppetd.cron']{
- source => undef,
- content => "# run puppet
-$puppet_crontime root /usr/sbin/puppetd --onetime --no-daemonize --splay --config=$puppet_config --color false | grep -E '(^err:|^alert:|^emerg:|^crit:)'\n",
- }
+ File['/etc/cron.d/puppetd.cron']{
+ source => undef,
+ content => "# run puppet\n$puppet_crontime root /usr/sbin/puppetd --onetime --no-daemonize --splay --config=$puppet_config --color false | grep -E '(^err:|^alert:|^emerg:|^crit:)'\n",
+ }
}
diff --git a/manifests/cron/openbsd.pp b/manifests/cron/openbsd.pp
index f10fa24..5565fbb 100644
--- a/manifests/cron/openbsd.pp
+++ b/manifests/cron/openbsd.pp
@@ -1,22 +1,20 @@
class puppet::cron::openbsd inherits puppet::openbsd {
- include puppet::cron::base
- case $puppet_config {
- '': { $puppet_config = '/etc/puppet/puppet.conf' }
- }
- Openbsd::Rc_local['puppetd']{
- ensure => 'absent',
- }
- Cron['puppetd_check']{
- ensure => absent,
- }
- Cron['puppetd_restart']{
- ensure => absent,
- }
+ include puppet::cron::base
+ if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' }
- cron { 'puppetd_run':
- command => "/usr/local/sbin/puppetd --onetime --no-daemonize --splay --config=$puppet_config --color false | grep -E '(^err:|^alert:|^emerg:|^crit:)'",
- user => 'root',
- minute => [0,30],
- }
+ Openbsd::Rc_local['puppetd']{
+ ensure => 'absent',
+ }
+ Cron['puppetd_check']{
+ ensure => absent,
+ }
+ Cron['puppetd_restart']{
+ ensure => absent,
+ }
+ cron { 'puppetd_run':
+ command => "/usr/local/sbin/puppetd --onetime --no-daemonize --splay --config=$puppet_config --color false | grep -E '(^err:|^alert:|^emerg:|^crit:)'",
+ user => 'root',
+ minute => [0,30],
+ }
}
diff --git a/manifests/debian.pp b/manifests/debian.pp
index 507ec52..f4bfee7 100644
--- a/manifests/debian.pp
+++ b/manifests/debian.pp
@@ -1,17 +1,18 @@
class puppet::debian inherits puppet::linux {
- file{'/etc/default/puppet':
- source => [ "puppet://$server/modules/site-puppet/client/debian/${fqdn}/puppet",
- "puppet://$server/modules/site-puppet/client/debian/${domain}/puppet",
- "puppet://$server/modules/site-puppet/client/debian/puppet",
- "puppet://$server/modules/puppet/client/debian/puppet" ],
- notify => Service[puppet],
- owner => root, group => 0, mode => 0644;
- } # there is really no status cmd for it
- Service[puppet]{
- hasstatus => false,
- }
- File['/etc/cron.d/puppetd.cron']{
- path => '/etc/cron.d/puppetd',
- }
+ file{'/etc/default/puppet':
+ source => [ "puppet://$server/modules/site-puppet/client/debian/${fqdn}/puppet",
+ "puppet://$server/modules/site-puppet/client/debian/${domain}/puppet",
+ "puppet://$server/modules/site-puppet/client/debian/puppet",
+ "puppet://$server/modules/puppet/client/debian/puppet" ],
+ notify => Service[puppet],
+ owner => root, group => 0, mode => 0644;
+ }
+ # there is really no status cmd for it
+ Service[puppet]{
+ hasstatus => false,
+ }
+ File['/etc/cron.d/puppetd.cron']{
+ path => '/etc/cron.d/puppetd',
+ }
}
diff --git a/manifests/gentoo.pp b/manifests/gentoo.pp
index 59d299f..5c9b174 100644
--- a/manifests/gentoo.pp
+++ b/manifests/gentoo.pp
@@ -1,12 +1,12 @@
class puppet::gentoo inherits puppet::linux {
- Package[puppet]{
- category => 'app-admin',
- }
- Package[facter]{
- category => 'dev-ruby',
- }
- # as we use sometimes the init script to test
- Service[puppet]{
- hasstatus => false,
- }
+ Package[puppet]{
+ category => 'app-admin',
+ }
+ Package[facter]{
+ category => 'dev-ruby',
+ }
+ # as we use sometimes the init script to test
+ Service[puppet]{
+ hasstatus => false,
+ }
}
diff --git a/manifests/init.pp b/manifests/init.pp
index 0b21aea..e9d9748 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -19,20 +19,20 @@
#
class puppet {
- case $kernel {
- linux: {
- case $operatingsystem {
- gentoo: { include puppet::gentoo }
- centos: { include puppet::centos }
- debian,ubuntu: { include puppet::debian }
- default: { include puppet::linux}
- }
- }
- openbsd: { include puppet::openbsd }
- default: { include puppet::base }
+ case $kernel {
+ linux: {
+ case $operatingsystem {
+ gentoo: { include puppet::gentoo }
+ centos: { include puppet::centos }
+ debian,ubuntu: { include puppet::debian }
+ default: { include puppet::linux}
+ }
}
+ openbsd: { include puppet::openbsd }
+ default: { include puppet::base }
+ }
- if $use_shorewall {
- include shorewall::rules::out::puppet
- }
+ if $use_shorewall {
+ include shorewall::rules::out::puppet
+ }
}
diff --git a/manifests/linux.pp b/manifests/linux.pp
index f9e2ea6..cfdac71 100644
--- a/manifests/linux.pp
+++ b/manifests/linux.pp
@@ -1,27 +1,27 @@
class puppet::linux inherits puppet::base {
- if $puppet_ensure_version == '' { $puppet_ensure_version = 'installed' }
- package{ 'puppet':
- ensure => $puppet_ensure_version,
- }
+ if !$puppet_ensure_version { $puppet_ensure_version = 'installed' }
+ package{ 'puppet':
+ ensure => $puppet_ensure_version,
+ }
- if $facter_ensure_version == '' { $facter_ensure_version = 'installed' }
- package{ 'facter':
- ensure => $facter_ensure_version,
- }
+ if !$facter_ensure_version { $facter_ensure_version = 'installed' }
+ package{ 'facter':
+ ensure => $facter_ensure_version,
+ }
- # package bc needed for cron job
- include bc
- Service['puppet']{
- require => Package[puppet],
- }
+ # package bc needed for cron job
+ include bc
+ Service['puppet']{
+ require => Package[puppet],
+ }
- include ::cron
+ include ::cron
- file{'/etc/cron.d/puppetd.cron':
- source => [ "puppet://$server/modules/puppet/cron.d/puppetd.${operatingsystem}",
- "puppet://$server/modules/puppet/cron.d/puppetd" ],
- owner => root, group => 0, mode => 0644,
- notify => Service['cron'];
- }
+ file{'/etc/cron.d/puppetd.cron':
+ source => [ "puppet://$server/modules/puppet/cron.d/puppetd.${operatingsystem}",
+ "puppet://$server/modules/puppet/cron.d/puppetd" ],
+ owner => root, group => 0, mode => 0644,
+ notify => Service['cron'];
+ }
}
diff --git a/manifests/openbsd.pp b/manifests/openbsd.pp
index d08a50b..7427a86 100644
--- a/manifests/openbsd.pp
+++ b/manifests/openbsd.pp
@@ -1,23 +1,23 @@
class puppet::openbsd inherits puppet::base {
- Service['puppet']{
- restart => '/bin/kill -HUP `/bin/cat /var/run/puppet/puppetd.pid`',
- stop => '/bin/kill `/bin/cat /var/run/puppet/puppetd.pid`',
- start => '/usr/local/bin/puppetd',
- hasstatus => false,
- hasrestart => false,
- }
- openbsd::rc_local{'puppetd':
- binary => '/usr/local/bin/puppetd',
- }
- cron { 'puppetd_check':
- command => '/bin/ps ax | /usr/bin/grep -v grep | /usr/bin/grep -q puppetd || (sleep `echo $RANDOM/2000*60 | bc` && /usr/local/bin/puppetd)',
- user => root,
- minute => 0,
- }
- cron { 'puppetd_restart':
- command => 'sleep `echo $RANDOM/2000*60 | bc` && /bin/kill `/bin/cat /var/run/puppet/puppetd.pid`; /usr/local/bin/puppetd',
- minute => 0,
- hour => 22,
- monthday => '*/2',
- }
+ Service['puppet']{
+ restart => '/bin/kill -HUP `/bin/cat /var/run/puppet/puppetd.pid`',
+ stop => '/bin/kill `/bin/cat /var/run/puppet/puppetd.pid`',
+ start => '/usr/local/bin/puppetd',
+ hasstatus => false,
+ hasrestart => false,
+ }
+ openbsd::rc_local{'puppetd':
+ binary => '/usr/local/bin/puppetd',
+ }
+ cron { 'puppetd_check':
+ command => '/bin/ps ax | /usr/bin/grep -v grep | /usr/bin/grep -q puppetd || (sleep `echo $RANDOM/2000*60 | bc` && /usr/local/bin/puppetd)',
+ user => root,
+ minute => 0,
+ }
+ cron { 'puppetd_restart':
+ command => 'sleep `echo $RANDOM/2000*60 | bc` && /bin/kill `/bin/cat /var/run/puppet/puppetd.pid`; /usr/local/bin/puppetd',
+ minute => 0,
+ hour => 22,
+ monthday => '*/2',
+ }
}
diff --git a/manifests/puppetmaster.pp b/manifests/puppetmaster.pp
index 1b1094c..f9f4306 100644
--- a/manifests/puppetmaster.pp
+++ b/manifests/puppetmaster.pp
@@ -1,17 +1,17 @@
# manifests/puppetmaster.pp
class puppet::puppetmaster inherits puppet {
- case $operatingsystem {
- debian: { include puppet::puppetmaster::debian }
- centos: { include puppet::puppetmaster::centos }
- default: {
- case $kernel {
- linux: { include puppet::puppetmaster::linux }
- }
- }
+ case $operatingsystem {
+ debian: { include puppet::puppetmaster::debian }
+ centos: { include puppet::puppetmaster::centos }
+ default: {
+ case $kernel {
+ linux: { include puppet::puppetmaster::linux }
+ }
}
- include puppet::puppetmaster::base
+ }
- include puppet::puppetmaster::checklastrun
+ include puppet::puppetmaster::base
+ include puppet::puppetmaster::checklastrun
if $use_shorewall {
include shorewall::rules::puppet::master
diff --git a/manifests/puppetmaster/base.pp b/manifests/puppetmaster/base.pp
index b23e386..5eb2839 100644
--- a/manifests/puppetmaster/base.pp
+++ b/manifests/puppetmaster/base.pp
@@ -1,39 +1,37 @@
class puppet::puppetmaster::base inherits puppet::base {
File[puppet_config]{
- source => [ "puppet://$server/modules/site-puppet/master/puppet.conf",
- "puppet://$server/modules/puppet/master/puppet.conf" ],
- notify => Service[puppetmaster],
+ source => [ "puppet://$server/modules/site-puppet/master/puppet.conf",
+ "puppet://$server/modules/puppet/master/puppet.conf" ],
+ notify => Service[puppetmaster],
}
- $real_puppet_fileserverconfig = $puppet_fileserverconfig ? {
- '' => "/etc/puppet/fileserver.conf",
- default => $puppet_fileserverconfig,
- }
+ if !$puppet_fileserverconfig { $puppet_fileserverconfig = '/etc/puppet/fileserver.conf' }
- file { "$real_puppet_fileserverconfig":
- source => [ "puppet://$server/modules/site-puppet/master/${fqdn}/fileserver.conf",
- "puppet://$server/modules/site-puppet/master/fileserver.conf",
- "puppet://$server/modules/puppet/master/fileserver.conf" ],
- notify => [Service[puppet],Service[puppetmaster] ],
- owner => root, group => puppet, mode => 640;
- }
+ file { "$puppet_fileserverconfig":
+ source => [ "puppet://$server/modules/site-puppet/master/${fqdn}/fileserver.conf",
+ "puppet://$server/modules/site-puppet/master/fileserver.conf",
+ "puppet://$server/modules/puppet/master/fileserver.conf" ],
+ notify => [ Service[puppet],Service[puppetmaster] ],
+ owner => root, group => puppet, mode => 640;
+ }
- if $puppetmaster_storeconfigs {
- include puppet::puppetmaster::storeconfigs
- }
+ if $puppetmaster_storeconfigs {
+ include puppet::puppetmaster::storeconfigs
+ }
- if ! defined (puppet::puppetmaster::passenger) {
- # restart the master from time to time to avoid memory problems
- file{'/etc/cron.d/puppetmaster.cron':
+ if ! defined (puppet::puppetmaster::passenger) {
+ # restart the master from time to time to avoid memory problems
+ file{'/etc/cron.d/puppetmaster.cron':
source => [ "puppet://$server/modules/puppet/cron.d/puppetmaster.${operatingsystem}",
- "puppet://$server/modules/puppet/cron.d/puppetmaster" ],
+ "puppet://$server/modules/puppet/cron.d/puppetmaster" ],
owner => root, group => 0, mode => 0644;
- }
- }
+ }
+ }
- file{'/etc/cron.daily/puppet_reports_cleanup.sh':
- content => "#!/bin/bash\nfind /var/log/puppet/reports/ -maxdepth 2 -type f -ctime +30 -exec rm {} \\;\n",
- owner => root, group => 0, mode => 0700;
- }
+ # clean up reports older than 30 days
+ file{'/etc/cron.daily/puppet_reports_cleanup.sh':
+ content => "#!/bin/bash\nfind /var/log/puppet/reports/ -maxdepth 2 -type f -ctime +30 -exec rm {} \\;\n",
+ owner => root, group => 0, mode => 0700;
+ }
}
diff --git a/manifests/puppetmaster/centos.pp b/manifests/puppetmaster/centos.pp
index 93a3a02..9a6cf91 100644
--- a/manifests/puppetmaster/centos.pp
+++ b/manifests/puppetmaster/centos.pp
@@ -1,12 +1,12 @@
# manifests/puppetmaster/centos.pp
class puppet::puppetmaster::centos inherits puppet::puppetmaster::package {
- file{'/etc/sysconfig/puppetmaster':
- source => [ "puppet://$server/modules/site-puppet/sysconfig/${fqdn}/puppetmaster",
- "puppet://$server/modules/site-puppet/sysconfig/${domain}/puppetmaster",
- "puppet://$server/modules/site-puppet/sysconfig/puppetmaster",
- "puppet://$server/modules/puppet/sysconfig/puppetmaster" ],
- notify => Service[puppetmaster],
- owner => root, group => 0, mode => 0644;
- }
+ file{'/etc/sysconfig/puppetmaster':
+ source => [ "puppet://$server/modules/site-puppet/sysconfig/${fqdn}/puppetmaster",
+ "puppet://$server/modules/site-puppet/sysconfig/${domain}/puppetmaster",
+ "puppet://$server/modules/site-puppet/sysconfig/puppetmaster",
+ "puppet://$server/modules/puppet/sysconfig/puppetmaster" ],
+ notify => Service[puppetmaster],
+ owner => root, group => 0, mode => 0644;
+ }
}
diff --git a/manifests/puppetmaster/checklastrun.pp b/manifests/puppetmaster/checklastrun.pp
index 0c0126d..0c3af5f 100644
--- a/manifests/puppetmaster/checklastrun.pp
+++ b/manifests/puppetmaster/checklastrun.pp
@@ -1,13 +1,13 @@
class puppet::puppetmaster::checklastrun {
- file{"/usr/local/bin/puppetlast":
- source => [ "puppet://$server/modules/site-puppet/master/puppetlast",
- "puppet://$server/modules/puppet/master/puppetlast"],
- owner => root, group => 0, mode => 0700;
- }
- file{'/etc/cron.d/puppetlast.cron':
- content => "40 10,22 * * * root /usr/local/bin/puppetlast\n",
- require => File["/usr/local/bin/puppetlast"],
- owner => root, group => 0, mode => 0644,
- notify => service["cron"];
- }
+ file{"/usr/local/bin/puppetlast":
+ source => [ "puppet://$server/modules/site-puppet/master/puppetlast",
+ "puppet://$server/modules/puppet/master/puppetlast" ],
+ owner => root, group => 0, mode => 0700;
+ }
+ file{'/etc/cron.d/puppetlast.cron':
+ content => "40 10,22 * * * root /usr/local/bin/puppetlast\n",
+ require => File["/usr/local/bin/puppetlast"],
+ owner => root, group => 0, mode => 0644,
+ notify => service["cron"];
+ }
}
diff --git a/manifests/puppetmaster/cluster.pp b/manifests/puppetmaster/cluster.pp
index 2242ba7..41298b3 100644
--- a/manifests/puppetmaster/cluster.pp
+++ b/manifests/puppetmaster/cluster.pp
@@ -1,5 +1,3 @@
-# manifests/puppetmaster/cluster.pp
-
class puppet::puppetmaster::cluster inherits puppet::puppetmaster {
- include puppet::puppetmaster::cluster::base
+ include puppet::puppetmaster::cluster::base
}
diff --git a/manifests/puppetmaster/cluster/base.pp b/manifests/puppetmaster/cluster/base.pp
index 759b0d2..1aa1f8b 100644
--- a/manifests/puppetmaster/cluster/base.pp
+++ b/manifests/puppetmaster/cluster/base.pp
@@ -1,8 +1,8 @@
class puppet::puppetmaster::cluster::base inherits puppet::puppetmaster::base {
- include mongrel, nginx
+ include mongrel, nginx
- File[puppet_config] {
- require +> [ Package[mongrel], Package[nginx], File[nginx_config] ],
- }
+ File[puppet_config] {
+ require +> [ Package[mongrel], Package[nginx], File[nginx_config] ],
+ }
}
diff --git a/manifests/puppetmaster/debian.pp b/manifests/puppetmaster/debian.pp
index bcbee9b..14ea3cc 100644
--- a/manifests/puppetmaster/debian.pp
+++ b/manifests/puppetmaster/debian.pp
@@ -1,4 +1 @@
-# manifests/puppetmaster/debian.pp
-
-class puppet::puppetmaster::debian inherits puppet::puppetmaster::package {
-}
+class puppet::puppetmaster::debian inherits puppet::puppetmaster::package { }
diff --git a/manifests/puppetmaster/hasdb.pp b/manifests/puppetmaster/hasdb.pp
index 82bbe47..1ba1331 100644
--- a/manifests/puppetmaster/hasdb.pp
+++ b/manifests/puppetmaster/hasdb.pp
@@ -1,19 +1,17 @@
define puppet::puppetmaster::hasdb(
- $dbtype = 'mysql',
- $dbname = 'puppet',
- $dbhost = 'localhost',
- # this is needed due to the collection of the databases
- $dbhostfqdn = "${fqdn}",
- $dbuser = 'puppet',
- $dbpwd = $puppet_storeconfig_password,
- $dbconnectinghost = 'locahost'
+ $dbtype = 'mysql',
+ $dbname = 'puppet',
+ $dbhost = 'localhost',
+ # this is needed due to the collection of the databases
+ $dbhostfqdn = "${fqdn}",
+ $dbuser = 'puppet',
+ $dbpwd = $puppet_storeconfig_password,
+ $dbconnectinghost = 'locahost'
){
- case $puppet_storeconfig_password {
- '': { fail("No \$puppet_storeconfig_password is set, please set it in your manifests or site.pp to add a password") }
- }
+ if !$puppet_storeconfig_password { fail("No \$puppet_storeconfig_password is set, please set it in your manifests or site.pp to add a password") }
- case $dbtype {
- 'mysql': { puppet::puppetmaster::hasdb::mysql{$name: dbname => $dbname, dbhost => $dbhost, dbuser => $dbuser, dbpwd => $dbpwd, } }
- }
+ case $dbtype {
+ 'mysql': { puppet::puppetmaster::hasdb::mysql{$name: dbname => $dbname, dbhost => $dbhost, dbuser => $dbuser, dbpwd => $dbpwd, } }
+ }
}
diff --git a/manifests/puppetmaster/hasdb/mysql.pp b/manifests/puppetmaster/hasdb/mysql.pp
index 51fd776..22e6434 100644
--- a/manifests/puppetmaster/hasdb/mysql.pp
+++ b/manifests/puppetmaster/hasdb/mysql.pp
@@ -1,31 +1,31 @@
# don't use this define use the general interface
define puppet::puppetmaster::hasdb::mysql(
- $dbname = 'puppet',
- $dbhost = 'localhost',
- $dbhostfqdn = "${fqdn}",
- $dbuser = 'puppet',
- $dbpwd,
- $dbconnectinghost = 'localhost'
+ $dbname = 'puppet',
+ $dbhost = 'localhost',
+ $dbhostfqdn = "${fqdn}",
+ $dbuser = 'puppet',
+ $dbpwd,
+ $dbconnectinghost = 'localhost'
){
- @@mysql_database{$dbname:
- tag => "mysql_${dbhostfqdn}",
- }
+ @@mysql_database{$dbname:
+ tag => "mysql_${dbhostfqdn}",
+ }
- @@mysql_user{"${dbuser}@${dbconnectinghost}":
- password_hash => mysql_password("$dbpwd"),
- require => Mysql_database[$dbname],
- tag => "mysql_${dbhostfqdn}",
- }
+ @@mysql_user{"${dbuser}@${dbconnectinghost}":
+ password_hash => mysql_password("$dbpwd"),
+ require => Mysql_database[$dbname],
+ tag => "mysql_${dbhostfqdn}",
+ }
- @@mysql_grant{"${dbuser}@${dbconnectinghost}/${dbname}":
- privileges => all,
- require => Mysql_user["${dbuser}@${dbconnectinghost}"],
- tag => "mysql_${dbhostfqdn}",
- }
+ @@mysql_grant{"${dbuser}@${dbconnectinghost}/${dbname}":
+ privileges => all,
+ require => Mysql_user["${dbuser}@${dbconnectinghost}"],
+ tag => "mysql_${dbhostfqdn}",
+ }
- munin::plugin::deploy{'puppetresources':
- source => "puppet/munin/puppetresources.mysql",
- config => "env.mysqlopts --user=$dbuser --password=$dbpwd -h $dbhost\nenv.puppetdb $dbname",
- }
+ munin::plugin::deploy{'puppetresources':
+ source => "puppet/munin/puppetresources.mysql",
+ config => "env.mysqlopts --user=$dbuser --password=$dbpwd -h $dbhost\nenv.puppetdb $dbname",
+ }
}
diff --git a/manifests/puppetmaster/linux.pp b/manifests/puppetmaster/linux.pp
index 2a71dd4..062d907 100644
--- a/manifests/puppetmaster/linux.pp
+++ b/manifests/puppetmaster/linux.pp
@@ -1,29 +1,26 @@
-# manifests/puppetmaster/linux.pp
-
class puppet::puppetmaster::linux inherits puppet::linux {
-
- if defined (puppet::puppetmaster::passenger) {
- service{'puppetmaster':
+
+ if defined (puppet::puppetmaster::passenger) {
+ service{'puppetmaster':
ensure => running,
- #name => apache2,
+ #name => apache2,
#enable => true,
- pattern => 'apache2',
+ pattern => 'apache2',
hasstatus => true,
- start => '/etc/init.d/apache2 start',
+ start => '/etc/init.d/apache2 start',
stop => '/etc/init.d/apache2 start',
restart => '/etc/init.d/apache2 restart',
- status => 'pgrep apache2',
+ status => 'pgrep apache2',
require => [ Package[puppet] ],
- }
- }
- else {
- service{'puppetmaster':
+ }
+ } else {
+ service{'puppetmaster':
ensure => running,
- enable => true,
+ enable => true,
require => [ Package[puppet] ],
- }
- }
- Service[puppet]{
- require +> Service[puppetmaster],
- }
+ }
+ }
+ Service[puppet]{
+ require +> Service[puppetmaster],
+ }
}
diff --git a/manifests/puppetmaster/package.pp b/manifests/puppetmaster/package.pp
index c17c6f9..4be146d 100644
--- a/manifests/puppetmaster/package.pp
+++ b/manifests/puppetmaster/package.pp
@@ -1,10 +1,8 @@
# manifests/puppetmaster/package.pp
class puppet::puppetmaster::package inherits puppet::puppetmaster::linux {
-
- case $operatingsystem {
- centos: { include puppet::puppetmaster::package::centos }
- default: { include puppet::puppetmaster::package::base }
- }
-
+ case $operatingsystem {
+ centos: { include puppet::puppetmaster::package::centos }
+ default: { include puppet::puppetmaster::package::base }
+ }
}
diff --git a/manifests/puppetmaster/package/base.pp b/manifests/puppetmaster/package/base.pp
index 1eb9302..94f2c79 100644
--- a/manifests/puppetmaster/package/base.pp
+++ b/manifests/puppetmaster/package/base.pp
@@ -1,11 +1,9 @@
class puppet::puppetmaster::package::base inherits puppet::puppetmaster::package {
+ package{'puppetmaster':
+ ensure => present,
+ }
- package { 'puppetmaster':
- ensure => present,
- }
-
- Service['puppetmaster']{
- require +> Package['puppetmaster'],
- }
-
+ Service['puppetmaster']{
+ require +> Package['puppetmaster'],
+ }
}
diff --git a/manifests/puppetmaster/package/centos.pp b/manifests/puppetmaster/package/centos.pp
index f6470ec..e3bb145 100644
--- a/manifests/puppetmaster/package/centos.pp
+++ b/manifests/puppetmaster/package/centos.pp
@@ -1,8 +1,6 @@
class puppet::puppetmaster::package::centos inherits puppet::puppetmaster::package::base {
-
- Package['puppetmaster'] {
- name => 'puppet-server',
- alias => 'puppetmaster',
- }
-
+ Package['puppetmaster']{
+ name => 'puppet-server',
+ alias => 'puppetmaster',
+ }
}
diff --git a/manifests/puppetmaster/passenger.pp b/manifests/puppetmaster/passenger.pp
index 244e2bb..375d364 100644
--- a/manifests/puppetmaster/passenger.pp
+++ b/manifests/puppetmaster/passenger.pp
@@ -2,26 +2,20 @@
class puppet::puppetmaster::passenger inherits puppet::puppetmaster::base {
- include ::passenger
+ include ::passenger
- # A reference configuration is available at :
- # http://github.com/reductivelabs/puppet/tree/master/ext/rack
+ # A reference configuration is available at :
+ # http://github.com/reductivelabs/puppet/tree/master/ext/rack
- file { ['/etc/puppet/rack', '/etc/puppet/rack/public']:
- ensure => directory,
- owner => root,
- group => 0,
- mode => 0755,
- }
-
- file { "/etc/puppet/rack/config.ru":
- ensure => present,
- source => [ "puppet://${server}/modules/site-puppet/master/config.ru",
- "puppet://${server}/modules/puppet/master/config.ru",
- ],
- owner => puppet,
- group => 0,
- mode => 0644,
- }
+ file { ['/etc/puppet/rack', '/etc/puppet/rack/public']:
+ ensure => directory,
+ owner => root, group => 0, mode => 0755;
+ }
+ file {'/etc/puppet/rack/config.ru':
+ ensure => present,
+ source => [ "puppet://${server}/modules/site-puppet/master/config.ru",
+ "puppet://${server}/modules/puppet/master/config.ru" ],
+ owner => puppet, group => 0, mode => 0644;
+ }
}
diff --git a/manifests/puppetmaster/storeconfigs.pp b/manifests/puppetmaster/storeconfigs.pp
index a3b09bd..63c1191 100644
--- a/manifests/puppetmaster/storeconfigs.pp
+++ b/manifests/puppetmaster/storeconfigs.pp
@@ -2,9 +2,7 @@
# so storeconfigs works.
class puppet::puppetmaster::storeconfigs {
-
- include rails
- include mysql::server
- include mysql::client::ruby
-
+ include rails
+ include mysql::server
+ include mysql::client::ruby
}