From 735572fac73a710321b2bc469be2cbdf17c46b11 Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Sun, 28 Nov 2010 13:01:46 -0500 Subject: Fix whitespace and coding standards to use standard formatting styles (I believe that this Closes #2353) --- manifests/puppetmaster/base.pp | 1 + manifests/puppetmaster/centos.pp | 4 ++-- manifests/puppetmaster/checklastrun.pp | 20 +++++++++++--------- manifests/puppetmaster/checklastrun/disable.pp | 1 + manifests/puppetmaster/cleanup_reports.pp | 3 ++- manifests/puppetmaster/cleanup_reports/disable.pp | 1 + manifests/puppetmaster/cluster.pp | 2 ++ manifests/puppetmaster/cluster/base.pp | 3 ++- manifests/puppetmaster/hasdb.pp | 6 +++--- manifests/puppetmaster/hasdb/mysql.pp | 15 +++++++-------- manifests/puppetmaster/linux.pp | 14 +++++++------- manifests/puppetmaster/package/base.pp | 3 ++- manifests/puppetmaster/package/centos.pp | 1 + manifests/puppetmaster/passenger.pp | 16 ++++++++-------- 14 files changed, 50 insertions(+), 40 deletions(-) (limited to 'manifests/puppetmaster') diff --git a/manifests/puppetmaster/base.pp b/manifests/puppetmaster/base.pp index 6f9bdc7..6ac1e0c 100644 --- a/manifests/puppetmaster/base.pp +++ b/manifests/puppetmaster/base.pp @@ -1,4 +1,5 @@ class puppet::puppetmaster::base inherits puppet::base { + File[puppet_config]{ source => [ "puppet:///modules/site-puppet/master/puppet.conf", "puppet:///modules/puppet/master/puppet.conf" ], diff --git a/manifests/puppetmaster/centos.pp b/manifests/puppetmaster/centos.pp index 0daa69b..2673a4d 100644 --- a/manifests/puppetmaster/centos.pp +++ b/manifests/puppetmaster/centos.pp @@ -1,7 +1,7 @@ # manifests/puppetmaster/centos.pp - class puppet::puppetmaster::centos inherits puppet::puppetmaster::package { - file{'/etc/sysconfig/puppetmaster': + + file { '/etc/sysconfig/puppetmaster': source => [ "puppet:///modules/site-puppet/sysconfig/${fqdn}/puppetmaster", "puppet:///modules/site-puppet/sysconfig/${domain}/puppetmaster", "puppet:///modules/site-puppet/sysconfig/puppetmaster", diff --git a/manifests/puppetmaster/checklastrun.pp b/manifests/puppetmaster/checklastrun.pp index 1cf5311..685d6b4 100644 --- a/manifests/puppetmaster/checklastrun.pp +++ b/manifests/puppetmaster/checklastrun.pp @@ -1,12 +1,14 @@ class puppet::puppetmaster::checklastrun { - file{"/usr/local/bin/puppetlast": - source => [ "puppet:///modules/site-puppet/master/puppetlast", - "puppet:///modules/puppet/master/puppetlast" ], - owner => root, group => 0, mode => 0700; - } - file{'/etc/cron.d/puppetlast.cron': - content => "${puppetmaster_checklastrun} root /usr/local/bin/puppetlast ${puppetmaster_checklastrun_timeout}\n", - require => File["/usr/local/bin/puppetlast"], - owner => root, group => 0, mode => 0644, + + file { + '/usr/local/bin/puppetlast': + source => [ "puppet:///modules/site-puppet/master/puppetlast", + "puppet:///modules/puppet/master/puppetlast" ], + owner => root, group => 0, mode => 0700; + + '/etc/cron.d/puppetlast.cron': + content => "${puppetmaster_checklastrun} root /usr/local/bin/puppetlast ${puppetmaster_checklastrun_timeout}\n", + require => File["/usr/local/bin/puppetlast"], + owner => root, group => 0, mode => 0644, } } diff --git a/manifests/puppetmaster/checklastrun/disable.pp b/manifests/puppetmaster/checklastrun/disable.pp index 47c0130..1ab4648 100644 --- a/manifests/puppetmaster/checklastrun/disable.pp +++ b/manifests/puppetmaster/checklastrun/disable.pp @@ -1,4 +1,5 @@ class puppet::puppetmaster::checklastrun::disable inherits puppet::puppetmaster::checklastrun { + File['/usr/local/bin/puppetlast']{ ensure => absent, } diff --git a/manifests/puppetmaster/cleanup_reports.pp b/manifests/puppetmaster/cleanup_reports.pp index 4d76ceb..58fb9e2 100644 --- a/manifests/puppetmaster/cleanup_reports.pp +++ b/manifests/puppetmaster/cleanup_reports.pp @@ -1,6 +1,7 @@ class puppet::puppetmaster::cleanup_reports { + # clean up reports older than $puppetmaster_cleanup_reports days - file{'/etc/cron.daily/puppet_reports_cleanup.sh': + file { '/etc/cron.daily/puppet_reports_cleanup.sh': content => "#!/bin/bash\nfind /var/log/puppet/reports/ -maxdepth 2 -type f -ctime +${puppetmaster_cleanup_reports} -exec rm {} \\;\n", owner => root, group => 0, mode => 0700; } diff --git a/manifests/puppetmaster/cleanup_reports/disable.pp b/manifests/puppetmaster/cleanup_reports/disable.pp index f195a3e..8636223 100644 --- a/manifests/puppetmaster/cleanup_reports/disable.pp +++ b/manifests/puppetmaster/cleanup_reports/disable.pp @@ -1,4 +1,5 @@ class puppet::puppetmaster::cleanup_reports::disable inherits puppet::puppetmaster::cleanup_reports { + File['/etc/cron.daily/puppet_reports_cleanup.sh']{ ensure => absent, } diff --git a/manifests/puppetmaster/cluster.pp b/manifests/puppetmaster/cluster.pp index 41298b3..8d635ab 100644 --- a/manifests/puppetmaster/cluster.pp +++ b/manifests/puppetmaster/cluster.pp @@ -1,3 +1,5 @@ class puppet::puppetmaster::cluster inherits puppet::puppetmaster { + include puppet::puppetmaster::cluster::base + } diff --git a/manifests/puppetmaster/cluster/base.pp b/manifests/puppetmaster/cluster/base.pp index 1aa1f8b..8c90153 100644 --- a/manifests/puppetmaster/cluster/base.pp +++ b/manifests/puppetmaster/cluster/base.pp @@ -1,6 +1,7 @@ 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] ], } diff --git a/manifests/puppetmaster/hasdb.pp b/manifests/puppetmaster/hasdb.pp index 1ba1331..2aca0e6 100644 --- a/manifests/puppetmaster/hasdb.pp +++ b/manifests/puppetmaster/hasdb.pp @@ -1,4 +1,4 @@ -define puppet::puppetmaster::hasdb( +define puppet::puppetmaster::hasdb ( $dbtype = 'mysql', $dbname = 'puppet', $dbhost = 'localhost', @@ -6,8 +6,8 @@ define puppet::puppetmaster::hasdb( $dbhostfqdn = "${fqdn}", $dbuser = 'puppet', $dbpwd = $puppet_storeconfig_password, - $dbconnectinghost = 'locahost' -){ + $dbconnectinghost = 'locahost' ) +{ if !$puppet_storeconfig_password { fail("No \$puppet_storeconfig_password is set, please set it in your manifests or site.pp to add a password") } diff --git a/manifests/puppetmaster/hasdb/mysql.pp b/manifests/puppetmaster/hasdb/mysql.pp index 22e6434..322bf69 100644 --- a/manifests/puppetmaster/hasdb/mysql.pp +++ b/manifests/puppetmaster/hasdb/mysql.pp @@ -1,30 +1,29 @@ # don't use this define use the general interface -define puppet::puppetmaster::hasdb::mysql( +define puppet::puppetmaster::hasdb::mysql ( $dbname = 'puppet', $dbhost = 'localhost', $dbhostfqdn = "${fqdn}", $dbuser = 'puppet', $dbpwd, - $dbconnectinghost = 'localhost' -){ - @@mysql_database{$dbname: + $dbconnectinghost = 'localhost' ) +{ + @@mysql_database { $dbname: tag => "mysql_${dbhostfqdn}", } - @@mysql_user{"${dbuser}@${dbconnectinghost}": + @@mysql_user { "${dbuser}@${dbconnectinghost}": password_hash => mysql_password("$dbpwd"), require => Mysql_database[$dbname], tag => "mysql_${dbhostfqdn}", } - - @@mysql_grant{"${dbuser}@${dbconnectinghost}/${dbname}": + @@mysql_grant { "${dbuser}@${dbconnectinghost}/${dbname}": privileges => all, require => Mysql_user["${dbuser}@${dbconnectinghost}"], tag => "mysql_${dbhostfqdn}", } - munin::plugin::deploy{'puppetresources': + 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 3d36f75..2670203 100644 --- a/manifests/puppetmaster/linux.pp +++ b/manifests/puppetmaster/linux.pp @@ -1,16 +1,16 @@ class puppet::puppetmaster::linux inherits puppet::linux { if $puppetmaster_mode == 'passenger' { - exec{'notify_passenger_puppetmaster': + exec { 'notify_passenger_puppetmaster': refreshonly => true, command => 'touch /etc/puppet/rack/tmp/restart.txt && sleep 1 && rm /etc/puppet/rack/tmp/restart.txt', - } + } } else { - service{'puppetmaster': - ensure => running, - enable => true, - require => [ Package[puppet] ], - } + service { 'puppetmaster': + ensure => running, + enable => true, + require => [ Package[puppet] ], + } } Service[puppet]{ require +> Service[puppetmaster], diff --git a/manifests/puppetmaster/package/base.pp b/manifests/puppetmaster/package/base.pp index 94f2c79..363f827 100644 --- a/manifests/puppetmaster/package/base.pp +++ b/manifests/puppetmaster/package/base.pp @@ -1,5 +1,6 @@ class puppet::puppetmaster::package::base inherits puppet::puppetmaster::package { - package{'puppetmaster': + + package { 'puppetmaster': ensure => present, } diff --git a/manifests/puppetmaster/package/centos.pp b/manifests/puppetmaster/package/centos.pp index e3bb145..43361fd 100644 --- a/manifests/puppetmaster/package/centos.pp +++ b/manifests/puppetmaster/package/centos.pp @@ -1,4 +1,5 @@ class puppet::puppetmaster::package::centos inherits puppet::puppetmaster::package::base { + Package['puppetmaster']{ name => 'puppet-server', alias => 'puppetmaster', diff --git a/manifests/puppetmaster/passenger.pp b/manifests/puppetmaster/passenger.pp index f7fa3ab..c4bc062 100644 --- a/manifests/puppetmaster/passenger.pp +++ b/manifests/puppetmaster/passenger.pp @@ -7,14 +7,14 @@ class puppet::puppetmaster::passenger inherits puppet::puppetmaster::base { # A reference configuration is available at : # http://github.com/reductivelabs/puppet/tree/master/ext/rack - file { ['/etc/puppet/rack', '/etc/puppet/rack/public', '/etc/puppet/rack/tmp']: - ensure => directory, - owner => root, group => 0, mode => 0755; - } + file { + ['/etc/puppet/rack', '/etc/puppet/rack/public', '/etc/puppet/rack/tmp']: + ensure => directory, + owner => root, group => 0, mode => 0755; - file {'/etc/puppet/rack/config.ru': - source => [ "puppet:///modules/site-puppet/master/config.ru", - "puppet:///modules/puppet/master/config.ru" ], - owner => puppet, group => 0, mode => 0644; + '/etc/puppet/rack/config.ru': + source => [ "puppet:///modules/site-puppet/master/config.ru", + "puppet:///modules/puppet/master/config.ru" ], + owner => puppet, group => 0, mode => 0644; } } -- cgit v1.2.3