From 09c8eaf304d1075980d8d9143545f2f16a1db34d Mon Sep 17 00:00:00 2001 From: mh Date: Tue, 5 Jun 2012 18:59:39 -0300 Subject: new style for 2.7 --- manifests/base.pp | 29 ++++----- manifests/base/master.pp | 6 ++ manifests/centos.pp | 6 +- manifests/cron.pp | 20 ++++++- manifests/cron/base.pp | 24 ++++++-- manifests/cron/linux.pp | 13 +--- manifests/cron/openbsd.pp | 26 +++----- manifests/debian.pp | 23 ++++--- manifests/init.pp | 22 ++++--- manifests/linux.pp | 12 ++-- manifests/master.pp | 73 +++++++++++++++++++++++ manifests/master/base.pp | 31 ++++++++++ manifests/master/centos.pp | 12 ++++ manifests/master/checklastrun.pp | 25 ++++++++ manifests/master/checklastrun/disable.pp | 12 ++++ manifests/master/cleanup_reports.pp | 7 +++ manifests/master/cleanup_reports/disable.pp | 6 ++ manifests/master/cluster.pp | 5 ++ manifests/master/cluster/base.pp | 9 +++ manifests/master/debian.pp | 19 ++++++ manifests/master/hasdb.pp | 17 ++++++ manifests/master/hasdb/mysql.pp | 32 ++++++++++ manifests/master/linux.pp | 18 ++++++ manifests/master/munin.pp | 9 +++ manifests/master/package.pp | 9 +++ manifests/master/package/base.pp | 10 ++++ manifests/master/package/centos.pp | 7 +++ manifests/master/package/debian.pp | 10 ++++ manifests/master/passenger.pp | 20 +++++++ manifests/master/storeconfigs.pp | 8 +++ manifests/puppetmaster.pp | 49 --------------- manifests/puppetmaster/base.pp | 38 ------------ manifests/puppetmaster/centos.pp | 12 ---- manifests/puppetmaster/checklastrun.pp | 25 -------- manifests/puppetmaster/checklastrun/disable.pp | 12 ---- manifests/puppetmaster/cleanup_reports.pp | 8 --- manifests/puppetmaster/cleanup_reports/disable.pp | 6 -- manifests/puppetmaster/cluster.pp | 5 -- manifests/puppetmaster/cluster/base.pp | 9 --- manifests/puppetmaster/debian.pp | 19 ------ manifests/puppetmaster/hasdb.pp | 17 ------ manifests/puppetmaster/hasdb/mysql.pp | 32 ---------- manifests/puppetmaster/linux.pp | 18 ------ manifests/puppetmaster/munin.pp | 9 --- manifests/puppetmaster/package.pp | 9 --- manifests/puppetmaster/package/base.pp | 10 ---- manifests/puppetmaster/package/centos.pp | 7 --- manifests/puppetmaster/package/debian.pp | 10 ---- manifests/puppetmaster/passenger.pp | 20 ------- manifests/puppetmaster/storeconfigs.pp | 8 --- 50 files changed, 438 insertions(+), 405 deletions(-) create mode 100644 manifests/base/master.pp create mode 100644 manifests/master.pp create mode 100644 manifests/master/base.pp create mode 100644 manifests/master/centos.pp create mode 100644 manifests/master/checklastrun.pp create mode 100644 manifests/master/checklastrun/disable.pp create mode 100644 manifests/master/cleanup_reports.pp create mode 100644 manifests/master/cleanup_reports/disable.pp create mode 100644 manifests/master/cluster.pp create mode 100644 manifests/master/cluster/base.pp create mode 100644 manifests/master/debian.pp create mode 100644 manifests/master/hasdb.pp create mode 100644 manifests/master/hasdb/mysql.pp create mode 100644 manifests/master/linux.pp create mode 100644 manifests/master/munin.pp create mode 100644 manifests/master/package.pp create mode 100644 manifests/master/package/base.pp create mode 100644 manifests/master/package/centos.pp create mode 100644 manifests/master/package/debian.pp create mode 100644 manifests/master/passenger.pp create mode 100644 manifests/master/storeconfigs.pp delete mode 100644 manifests/puppetmaster.pp delete mode 100644 manifests/puppetmaster/base.pp delete mode 100644 manifests/puppetmaster/centos.pp delete mode 100644 manifests/puppetmaster/checklastrun.pp delete mode 100644 manifests/puppetmaster/checklastrun/disable.pp delete mode 100644 manifests/puppetmaster/cleanup_reports.pp delete mode 100644 manifests/puppetmaster/cleanup_reports/disable.pp delete mode 100644 manifests/puppetmaster/cluster.pp delete mode 100644 manifests/puppetmaster/cluster/base.pp delete mode 100644 manifests/puppetmaster/debian.pp delete mode 100644 manifests/puppetmaster/hasdb.pp delete mode 100644 manifests/puppetmaster/hasdb/mysql.pp delete mode 100644 manifests/puppetmaster/linux.pp delete mode 100644 manifests/puppetmaster/munin.pp delete mode 100644 manifests/puppetmaster/package.pp delete mode 100644 manifests/puppetmaster/package/base.pp delete mode 100644 manifests/puppetmaster/package/centos.pp delete mode 100644 manifests/puppetmaster/package/debian.pp delete mode 100644 manifests/puppetmaster/passenger.pp delete mode 100644 manifests/puppetmaster/storeconfigs.pp (limited to 'manifests') diff --git a/manifests/base.pp b/manifests/base.pp index 695241c..9e597a8 100644 --- a/manifests/base.pp +++ b/manifests/base.pp @@ -1,36 +1,33 @@ class puppet::base { - if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' } - - $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1') - - case $puppet_cleanup_clientbucket { + $puppet_majorversion = regsubst($::puppetversion,'^(\d+\.\d+).*$','\1') + case $puppet::cleanup_clientbucket { # if not set, don't do anything - '',undef: {} - default: { + '',undef,false: {} + default: { tidy { "/var/lib/puppet/clientbucket": backup => false, recurse => true, rmdirs => true, type => mtime, - age => "$puppet_cleanup_clientbucket"; + age => "$puppet::cleanup_clientbucket"; } } } file { 'puppet_config': - path => "$puppet_config", - source => [ "puppet:///modules/site-puppet/client/${fqdn}/puppet.conf", - "puppet:///modules/site-puppet/client/puppet.conf.$operatingsystem", - "puppet:///modules/site-puppet/client/puppet.conf", - "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf.$operatingsystem", + path => $puppet::config, + source => [ "puppet:///modules/site_puppet/client/${::fqdn}/puppet.conf", + "puppet:///modules/site_puppet/client/puppet.conf.${::operatingsystem}", + "puppet:///modules/site_puppet/client/puppet.conf", + "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf.${::operatingsystem}", "puppet:///modules/puppet/client/${puppet_majorversion}/puppet.conf", - "puppet:///modules/puppet/client/puppet.conf.$operatingsystem", + "puppet:///modules/puppet/client/puppet.conf.${::operatingsystem}", "puppet:///modules/puppet/client/puppet.conf" ], notify => Service[puppet], - # if puppetmasterd is deployed by apache2/passenger it needs to read puppet.conf + # 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; + owner => puppet, group => 0, mode => 600; } service { 'puppet': diff --git a/manifests/base/master.pp b/manifests/base/master.pp new file mode 100644 index 0000000..09c9b62 --- /dev/null +++ b/manifests/base/master.pp @@ -0,0 +1,6 @@ +class puppet::base::master inherits puppet::base { + File[puppet_config]{ + source => [ "puppet:///modules/site_puppet/master/puppet.conf", + "puppet:///modules/puppet/master/puppet.conf" ], + } +} diff --git a/manifests/centos.pp b/manifests/centos.pp index 61aa065..547b064 100644 --- a/manifests/centos.pp +++ b/manifests/centos.pp @@ -1,9 +1,9 @@ class puppet::centos inherits puppet::linux { file { '/etc/sysconfig/puppet': - source => [ "puppet:///modules/site-puppet/sysconfig/${fqdn}/puppet", - "puppet:///modules/site-puppet/sysconfig/${domain}/puppet", - "puppet:///modules/site-puppet/sysconfig/puppet", + source => [ "puppet:///modules/site_puppet/sysconfig/${::fqdn}/puppet", + "puppet:///modules/site_puppet/sysconfig/${::domain}/puppet", + "puppet:///modules/site_puppet/sysconfig/puppet", "puppet:///modules/puppet/sysconfig/puppet" ], notify => Service[puppet], owner => root, group => 0, mode => 0644; diff --git a/manifests/cron.pp b/manifests/cron.pp index 5f9f227..5e3cc64 100644 --- a/manifests/cron.pp +++ b/manifests/cron.pp @@ -1,9 +1,23 @@ -class puppet::cron inherits puppet { - case $operatingsystem { +class puppet::cron( + $cron_time, + $config = hiera('puppet_config','/etc/puppet/puppet.conf'), + $http_compression = hiera('puppet_http_compression',false), + $cleanup_clientbucket = hiera('puppet_cleanup_clientbucket',false), + $ensure_version = hiera('puppet_ensure_version', 'installed'), + $ensure_facter_version = hiera('puppet_ensure_facter_version', 'installed'), +) { + class{'puppet': + config => $config, + http_compression => $http_compression, + cleanup_clientbucket => $cleanup_clientbucket, + ensure_version => $ensure_version, + ensure_facter_version => $ensure_facter_version + } + case $::operatingsystem { debian: { include puppet::cron::debian } openbsd: { include puppet::cron::openbsd } default: { - case $kernel { + case $::kernel { linux: { include puppet::cron::linux } default: { include puppet::cron::base } } diff --git a/manifests/cron/base.pp b/manifests/cron/base.pp index 7b40da6..42222d6 100644 --- a/manifests/cron/base.pp +++ b/manifests/cron/base.pp @@ -1,19 +1,33 @@ # manifests/cron/base.pp class puppet::cron::base inherits puppet::base { - case $operatingsystem { - debian: { if $lsbdistcodename != 'lenny' { $stop_service = true } else { $stop_service = false } } + case $::operatingsystem { + debian: { if $::lsbdistcodename != 'lenny' { $stop_service = true } else { $stop_service = false } } openbsd, ubuntu: { $stop_service = false } default: { $stop_service = true } } - + + if !$puppet::cron::cron_time { + $crontime_interval_minute = fqdn_rand(29) + $crontime_interval_minute2 = inline_template("<%= 30+scope.lookupvar('puppet::cron::cron_time').to_i %>") + $crontime = "${crontime_interval_minute},${crontime_interval_minute2} * * * *" + } else { + $crontime = $puppet::cron::cron_time + } + + if $puppet::http_compression { + $http_compression_str = '--http_compression' + } else { + $http_compression_str = '' + } + Service['puppet']{ enable => false, } if $stop_service == true { - $puppet_majorversion = regsubst($puppetversion,'^(\d+\.\d+).*$','\1') - if $puppet_majorversion == '2.6' { + $puppet_majorversion = regsubst($::puppetversion,'^(\d+\.\d+).*$','\1') + if $puppet_majorversion == '2.6' { Service['puppet']{ ensure => stopped, } diff --git a/manifests/cron/linux.pp b/manifests/cron/linux.pp index bab9564..5452cc7 100644 --- a/manifests/cron/linux.pp +++ b/manifests/cron/linux.pp @@ -1,20 +1,11 @@ -# manifests/cron/linux.pp +# manifests/cron/linux.pp class puppet::cron::linux inherits puppet::linux { include puppet::cron::base - if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' } - if $puppet_http_compression { $puppet_http_compression_str = '--http_compression' } - - - if !$puppet_crontime { - $puppet_crontime_interval_minute = fqdn_rand(29) - $puppet_crontime_interval_minute2 = inline_template('<%= 30+puppet_crontime_interval_minute.to_i %>') - $puppet_crontime = "${puppet_crontime_interval_minute},${puppet_crontime_interval_minute2} * * * *" - } File['/etc/cron.d/puppetd.cron']{ source => undef, - content => "#run puppet\n$puppet_crontime root output=\$(/usr/sbin/puppetd --onetime --no-daemonize --splay --config=/etc/puppet/puppet.conf --color false); ret=\$?; printf \"\\%s\" \"\$output\" | grep -E '(^err:|^alert:|^emerg:|^crit:)'; exit \$ret\n", + content => "#run puppet\n$puppet::cron::base::crontime root output=\$(/usr/sbin/puppetd --onetime --no-daemonize --splay --config=/etc/puppet/puppet.conf --color false ${puppet::cron::base::http_compression_str}); ret=\$?; printf \"\\%s\" \"\$output\" | grep -E '(^err:|^alert:|^emerg:|^crit:)'; exit \$ret\n", before => Service['puppet'], } } diff --git a/manifests/cron/openbsd.pp b/manifests/cron/openbsd.pp index 084b022..0e4a813 100644 --- a/manifests/cron/openbsd.pp +++ b/manifests/cron/openbsd.pp @@ -1,32 +1,24 @@ class puppet::cron::openbsd inherits puppet::openbsd { - include puppet::cron::base - if !$puppet_config { $puppet_config = '/etc/puppet/puppet.conf' } - if $puppet_http_compression { $puppet_http_compression_str = '--http_compression' } - - if !$puppet_crontime { - $puppet_crontime_interval_minute = fqdn_rand(29) - $puppet_crontime_interval_minute2 = inline_template('<%= 30+puppet_crontime_interval_minute.to_i %>') - $puppet_crontime = "${puppet_crontime_interval_minute},${puppet_crontime_interval_minute2} * * * *" - } + include puppet::cron::base Openbsd::Rc_local['puppetd']{ ensure => 'absent', } Cron['puppetd_check']{ - ensure => absent, + ensure => absent, } Cron['puppetd_restart']{ - ensure => absent, + ensure => absent, } cron { 'puppetd_run': - command => "/usr/local/bin/puppet agent --onetime --no-daemonize --config=$puppet_config --color false $puppet_http_compression_str | grep -E '(^err:|^alert:|^emerg:|^crit:)'", + command => "/usr/local/bin/puppet agent --onetime --no-daemonize --config=$puppet::config --color false ${puppet::cron::base::http_compression_str} | grep -E '(^err:|^alert:|^emerg:|^crit:)'", user => 'root', - minute => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\1'),','), - hour => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\2'),','), - weekday => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\3'),','), - month => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\4'),','), - monthday => split(regsubst($puppet_crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\5'),',') + minute => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\1'),','), + hour => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\2'),','), + weekday => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\3'),','), + month => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\4'),','), + monthday => split(regsubst($puppet::cron::base::crontime,'^([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+) ([\d,\-,*,/,\,]+)$','\5'),',') } } diff --git a/manifests/debian.pp b/manifests/debian.pp index f0479ae..70f8161 100644 --- a/manifests/debian.pp +++ b/manifests/debian.pp @@ -1,35 +1,34 @@ class puppet::debian inherits puppet::linux { file { '/etc/default/puppet': - source => [ "puppet:///modules/site-puppet/client/debian/${fqdn}/puppet", - "puppet:///modules/site-puppet/client/debian/${domain}/puppet", - "puppet:///modules/site-puppet/client/debian/puppet", + source => [ "puppet:///modules/site_puppet/client/debian/${::fqdn}/puppet", + "puppet:///modules/site_puppet/client/debian/${::domain}/puppet", + "puppet:///modules/site_puppet/client/debian/puppet", "puppet:///modules/puppet/client/debian/puppet" ], notify => Service[puppet], owner => root, group => 0, mode => 0644; - } + } - case $lsbdistcodename { + case $::lsbdistcodename { squeeze,sid: { - $real_puppet_hasstatus = true + $puppet_hasstatus = true } default: { - $real_puppet_hasstatus = false + $puppet_hasstatus = false } } - + Service[puppet]{ - hasstatus => $real_puppet_hasstatus, + hasstatus => $puppet_hasstatus, } - if !$puppet_ensure_version { $puppet_ensure_version = 'installed' } package{ 'puppet-common': - ensure => $puppet_ensure_version, + ensure => $puppet::ensure_version, } Package['puppet']{ require => Package['puppet-common'] - } + } } diff --git a/manifests/init.pp b/manifests/init.pp index e9d9748..d6f605c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -12,16 +12,22 @@ # Marcel Härry haerry+puppet(at)puzzle.ch # Simon Josi josi+puppet(at)puzzle.ch # -# This program is free software; you can redistribute -# it and/or modify it under the terms of the GNU -# General Public License version 3 as published by +# This program is free software; you can redistribute +# it and/or modify it under the terms of the GNU +# General Public License version 3 as published by # the Free Software Foundation. # -class puppet { - case $kernel { - linux: { - case $operatingsystem { +class puppet( + $config = hiera('puppet_config','/etc/puppet/puppet.conf'), + $http_compression = hiera('puppet_http_compression',false), + $cleanup_clientbucket = hiera('puppet_cleanup_clientbucket',false), + $ensure_version = hiera('puppet_ensure_version', 'installed'), + $ensure_facter_version = hiera('puppet_ensure_facter_version', 'installed'), +) { + case $::kernel { + linux: { + case $::operatingsystem { gentoo: { include puppet::gentoo } centos: { include puppet::centos } debian,ubuntu: { include puppet::debian } @@ -32,7 +38,7 @@ class puppet { default: { include puppet::base } } - if $use_shorewall { + if hiera('use_shorewall',false) { include shorewall::rules::out::puppet } } diff --git a/manifests/linux.pp b/manifests/linux.pp index fcd3936..6fc17ba 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -1,22 +1,20 @@ class puppet::linux inherits puppet::base { - if !$puppet_ensure_version { $puppet_ensure_version = 'installed' } package { 'puppet': - ensure => $puppet_ensure_version, + ensure => $puppet::ensure_version, } - if !$facter_ensure_version { $facter_ensure_version = 'installed' } package { 'facter': - ensure => $facter_ensure_version, + ensure => $puppet::ensure_facter_version, } Service['puppet']{ require => Package[puppet], } - + file { '/etc/cron.d/puppetd.cron': - source => [ "puppet:///modules/site-puppet/cron.d/puppetd", - "puppet:///modules/puppet/cron.d/puppetd.${operatingsystem}", + source => [ "puppet:///modules/site_puppet/cron.d/puppetd", + "puppet:///modules/puppet/cron.d/puppetd.${::operatingsystem}", "puppet:///modules/puppet/cron.d/puppetd" ], owner => root, group => 0, mode => 0644, } diff --git a/manifests/master.pp b/manifests/master.pp new file mode 100644 index 0000000..5ca0acc --- /dev/null +++ b/manifests/master.pp @@ -0,0 +1,73 @@ +# manifests/puppetmaster.pp +class puppet::master( + $config = hiera('puppet_config','/etc/puppet/puppet.conf'), + $http_compression = hiera('puppet_http_compression',false), + $cleanup_clientbucket = hiera('puppet_cleanup_clientbucket',false), + $cron_time = hiera('puppet_cron_time',false), + $ensure_version = hiera('puppet_ensure_version', 'installed'), + $ensure_facter_version = hiera('puppet_ensure_facter_version', 'installed'), + $lastruncheck_cron = hiera('puppet_master_lastruncheck_cron','40 10 * * *'), + $lastruncheck_ignorehosts = hiera('puppet_master_lastruncheck_ignorehosts',''), + $lastruncheck_timeout = hiera('puppet_master_lastruncheck_timeout',''), + $lastruncheck_additionaloptions = hiera('puppet_master_lastruncheck_additionaloptions',''), + $mode = hiera('puppet_master_mode','webrick'), + $cleanup_reports = hiera('puppet_master_cleanup_reports','30'), + $reports_dir = hiera('puppet_master_reports_dir','/var/lib/puppet/reports'), +) { + if $cron_time { + class{'puppet::cron': + config => $config, + http_compression => $http_compression, + cleanup_clientbucket => $cleanup_clientbucket, + cron_time => $cron_time, + ensure_version => $ensure_version, + ensure_facter_version => $ensure_facter_version, + } + } else { + class{'puppet': + config => $config, + http_compression => $http_compression, + cleanup_clientbucket => $cleanup_clientbucket, + ensure_version => $ensure_version, + ensure_facter_version => $ensure_facter_version, + } + } + case $::operatingsystem { + debian: { include puppet::master::debian } + centos: { include puppet::master::centos } + default: { + case $::kernel { + linux: { include puppet::master::linux } + } + } + } + + include puppet::master::base + + + if $puppet::master::lastruncheck_cron { + include puppet::master::checklastrun + } else { + include puppet::master::checklastrun::disable + } + + if $puppet::master::mode == 'passenger' { + include puppet::master::passenger + } elsif $puppet::master::mode == 'cluster' { + include puppet::master::cluster + } + + if $puppet::master::cleanup_reports { + include puppet::master::cleanup_reports + } else { + include puppet::master::cleanup_reports::disable + } + + if hiera('use_shorewall',false) { + include shorewall::rules::puppet::master + } + + if hiera('use_munin',false) { + include puppet::master::munin + } +} diff --git a/manifests/master/base.pp b/manifests/master/base.pp new file mode 100644 index 0000000..80fe8e0 --- /dev/null +++ b/manifests/master/base.pp @@ -0,0 +1,31 @@ +class puppet::master::base inherits puppet::base { + + file { $puppet::master::fileserverconfig: + source => [ "puppet:///modules/site_puppet/master/${::fqdn}/fileserver.conf", + "puppet:///modules/site_puppet/master/fileserver.conf", + "puppet:///modules/puppet/master/fileserver.conf" ], + owner => root, group => puppet, mode => 640; + } + + if $puppet::master::storeconfigs { + include puppet::master::storeconfigs + } + + + if $puppet::master::mode == 'passenger' { + include puppet::master::passenger + File[$puppet::master::fileserverconfig]{ + notify => Exec['notify_passenger_puppetmaster'], + } + File[puppet_config]{ + notify => Exec['notify_passenger_puppetmaster'], + } + } else { + File[$puppet::master::fileserverconfig]{ + notify => Service[puppetmaster], + } + File[puppet_config]{ + notify => Service[puppetmaster], + } + } +} diff --git a/manifests/master/centos.pp b/manifests/master/centos.pp new file mode 100644 index 0000000..82a8436 --- /dev/null +++ b/manifests/master/centos.pp @@ -0,0 +1,12 @@ +# manifests/puppetmaster/centos.pp +class puppet::master::centos inherits puppet::master::package { + + 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", + "puppet:///modules/puppet/sysconfig/puppetmaster" ], + notify => Service[puppetmaster], + owner => root, group => 0, mode => 0644; + } +} diff --git a/manifests/master/checklastrun.pp b/manifests/master/checklastrun.pp new file mode 100644 index 0000000..bde5a97 --- /dev/null +++ b/manifests/master/checklastrun.pp @@ -0,0 +1,25 @@ +class puppet::master::checklastrun { + + $puppet_lastruncheck_ignorehosts_str = $puppet::master::lastruncheck_ignorehosts ? { + '' => '', + undef => '', + default => "--ignore-hosts ${puppet::master::lastruncheck_ignorehosts}" + } + + $puppet_lastruncheck_timeout_str = $puppet::master::lastruncheck_timeout ? { + '' => '', + undef => '', + default => "--timeout ${puppet::master::lastruncheck_timeout}" + } + + file{ + '/usr/local/sbin/puppetlast': + source => [ "puppet:///modules/puppet/master/lastruncheck" ], + owner => root, group => 0, mode => 0700; + + '/etc/cron.d/puppetlast.cron': + content => "${puppetmaster_lastruncheck_cron} root /usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${puppet::master::lastruncheck_additionaloptions}\n", + require => File["/usr/local/sbin/puppetlast"], + owner => root, group => 0, mode => 0644, + } +} diff --git a/manifests/master/checklastrun/disable.pp b/manifests/master/checklastrun/disable.pp new file mode 100644 index 0000000..655253d --- /dev/null +++ b/manifests/master/checklastrun/disable.pp @@ -0,0 +1,12 @@ +class puppet::master::checklastrun::disable inherits puppet::master::checklastrun { + + File['/usr/local/sbin/puppetlast']{ + source => undef, + ensure => absent, + } + + File['/etc/cron.d/puppetlast.cron']{ + ensure => absent, + } +} + diff --git a/manifests/master/cleanup_reports.pp b/manifests/master/cleanup_reports.pp new file mode 100644 index 0000000..98cb81a --- /dev/null +++ b/manifests/master/cleanup_reports.pp @@ -0,0 +1,7 @@ +class puppet::master::cleanup_reports { + # clean up reports older than $puppetmaster_cleanup_reports days + file { '/etc/cron.daily/puppet_reports_cleanup.sh': + content => "#!/bin/bash\nfind ${puppet::master::reports_dir} -maxdepth 2 -type f -ctime +${puppet::master::cleanup_reports} -exec rm {} \\;\n", + owner => root, group => 0, mode => 0700; + } +} diff --git a/manifests/master/cleanup_reports/disable.pp b/manifests/master/cleanup_reports/disable.pp new file mode 100644 index 0000000..e93e72a --- /dev/null +++ b/manifests/master/cleanup_reports/disable.pp @@ -0,0 +1,6 @@ +class puppet::master::cleanup_reports::disable inherits puppet::master::cleanup_reports { + + File['/etc/cron.daily/puppet_reports_cleanup.sh']{ + ensure => absent, + } +} diff --git a/manifests/master/cluster.pp b/manifests/master/cluster.pp new file mode 100644 index 0000000..d6aa4fd --- /dev/null +++ b/manifests/master/cluster.pp @@ -0,0 +1,5 @@ +class puppet::master::cluster inherits puppet::master { + + include puppet::master::cluster::base + +} diff --git a/manifests/master/cluster/base.pp b/manifests/master/cluster/base.pp new file mode 100644 index 0000000..cad0d7d --- /dev/null +++ b/manifests/master/cluster/base.pp @@ -0,0 +1,9 @@ +class puppet::master::cluster::base inherits puppet::master::base { + + include mongrel, nginx + + File[puppet_config] { + require +> [ Package[mongrel], Package[nginx], File[nginx_config] ], + } +} + diff --git a/manifests/master/debian.pp b/manifests/master/debian.pp new file mode 100644 index 0000000..f51a319 --- /dev/null +++ b/manifests/master/debian.pp @@ -0,0 +1,19 @@ +class puppet::master::debian inherits puppet::master::package { + + if $puppet::master::mode != 'passenger' { + case $::lsbdistcodename { + squeeze,sid: { + Service['puppetmaster'] { hasstatus => true, hasrestart => true } + } + } + } + + file { '/etc/default/puppetmaster': + source => [ "puppet:///modules/site_puppet/master/debian/${::fqdn}/puppetmaster", + "puppet:///modules/site_puppet/master/debian/${::domain}/puppetmaster", + "puppet:///modules/site_puppet/master/debian/puppetmaster", + "puppet:///modules/puppet/master/debian/puppetmaster" ], + notify => Service[puppetmaster], + owner => root, group => 0, mode => 0644; + } +} diff --git a/manifests/master/hasdb.pp b/manifests/master/hasdb.pp new file mode 100644 index 0000000..d3bf388 --- /dev/null +++ b/manifests/master/hasdb.pp @@ -0,0 +1,17 @@ +define puppet::master::hasdb ( + $dbtype = 'mysql', + $dbname = 'puppet', + $dbhost = 'localhost', + # this is needed due to the collection of the databases + $dbhostfqdn = $::fqdn, + $dbuser = 'puppet', + $dbpwd = hiera('puppet_master_storeconfigs_password',false), + $dbconnectinghost = 'locahost' +) { + + if !$dbpwd { fail("No \$puppet_master_storeconfig_password is set, please set it in your hiera database") } + + case $dbtype { + 'mysql': { puppet::master::hasdb::mysql{$name: dbname => $dbname, dbhost => $dbhost, dbuser => $dbuser, dbpwd => $dbpwd, } } + } +} diff --git a/manifests/master/hasdb/mysql.pp b/manifests/master/hasdb/mysql.pp new file mode 100644 index 0000000..bc15756 --- /dev/null +++ b/manifests/master/hasdb/mysql.pp @@ -0,0 +1,32 @@ +# don't use this define use the general interface +define puppet::master::hasdb::mysql ( + $dbname = 'puppet', + $dbhost = 'localhost', + $dbhostfqdn = $::fqdn, + $dbuser = 'puppet', + $dbpwd, + $dbconnectinghost = 'localhost' ) +{ + @@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}", + } + + if hiera('use_munin',false) { + 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/master/linux.pp b/manifests/master/linux.pp new file mode 100644 index 0000000..d2fb5b1 --- /dev/null +++ b/manifests/master/linux.pp @@ -0,0 +1,18 @@ +class puppet::master::linux inherits puppet::linux { + + if $puppet::master::mode == 'passenger' { + 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[puppet]{ + require +> Service[puppetmaster], + } +} diff --git a/manifests/master/munin.pp b/manifests/master/munin.pp new file mode 100644 index 0000000..8046162 --- /dev/null +++ b/manifests/master/munin.pp @@ -0,0 +1,9 @@ +class puppet::master::munin { + + munin::plugin::deploy { + [ 'puppetmaster_memory', 'puppet_clients' ]: + source => "puppet/munin/puppet_", + config => "user root" + } + +} diff --git a/manifests/master/package.pp b/manifests/master/package.pp new file mode 100644 index 0000000..03d8de6 --- /dev/null +++ b/manifests/master/package.pp @@ -0,0 +1,9 @@ +# manifests/puppetmaster/package.pp + +class puppet::master::package inherits puppet::master::linux { + case $::operatingsystem { + centos: { include puppet::master::package::centos } + debian: { include puppet::master::package::debian } + default: { include puppet::master::package::base } + } +} diff --git a/manifests/master/package/base.pp b/manifests/master/package/base.pp new file mode 100644 index 0000000..0a1fa33 --- /dev/null +++ b/manifests/master/package/base.pp @@ -0,0 +1,10 @@ +class puppet::master::package::base inherits puppet::master::package { + + package { 'puppetmaster': + ensure => $puppet::ensure_version, + } + + Service['puppetmaster']{ + require +> Package['puppetmaster'], + } +} diff --git a/manifests/master/package/centos.pp b/manifests/master/package/centos.pp new file mode 100644 index 0000000..63adc64 --- /dev/null +++ b/manifests/master/package/centos.pp @@ -0,0 +1,7 @@ +class puppet::master::package::centos inherits puppet::master::package::base { + + Package['puppetmaster']{ + name => 'puppet-server', + alias => 'puppetmaster', + } +} diff --git a/manifests/master/package/debian.pp b/manifests/master/package/debian.pp new file mode 100644 index 0000000..0cb351c --- /dev/null +++ b/manifests/master/package/debian.pp @@ -0,0 +1,10 @@ +class puppet::master::package::debian inherits puppet::master::package::base { + + package { 'puppetmaster-common': + ensure => present, + } + + Package['puppetmaster']{ + require => Package['puppetmaster-common'] + } +} diff --git a/manifests/master/passenger.pp b/manifests/master/passenger.pp new file mode 100644 index 0000000..03e1aa4 --- /dev/null +++ b/manifests/master/passenger.pp @@ -0,0 +1,20 @@ +# class to use passenger for serving puppetmaster + +class puppet::master::passenger inherits puppet::master::base { + + include ::passenger + + # 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; + + '/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; + } +} diff --git a/manifests/master/storeconfigs.pp b/manifests/master/storeconfigs.pp new file mode 100644 index 0000000..e3ba6fb --- /dev/null +++ b/manifests/master/storeconfigs.pp @@ -0,0 +1,8 @@ +# This class sets up the necessary ActiveRecord bits +# so storeconfigs works. + +class puppet::master::storeconfigs { + include rails + include mysql::server + include mysql::client::ruby +} diff --git a/manifests/puppetmaster.pp b/manifests/puppetmaster.pp deleted file mode 100644 index 3e8711c..0000000 --- a/manifests/puppetmaster.pp +++ /dev/null @@ -1,49 +0,0 @@ -# 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 } - } - } - } - - include puppet::puppetmaster::base - - - case $puppetmaster_lastruncheck_cron { - '',undef: { $puppetmaster_lastruncheck_cron = '40 10 * * *' } - } - - if $puppetmaster_lastruncheck_cron { - include puppet::puppetmaster::checklastrun - } else { - include puppet::puppetmaster::checklastrun::disable - } - - if $puppetmaster_mode == 'passenger' { - include puppet::puppetmaster::passenger - } elsif $puppetmaster_mode == 'cluster' { - include puppet::puppetmaster::cluster - } - - case $puppetmaster_cleanup_reports { - '': { $puppetmaster_cleanup_reports = '30' } - } - - if $puppetmaster_cleanup_reports { - include puppet::puppetmaster::cleanup_reports - } else { - include puppet::puppetmaster::cleanup_reports::disable - } - - if $use_shorewall { - include shorewall::rules::puppet::master - } - - if $use_munin { - include puppet::puppetmaster::munin - } -} diff --git a/manifests/puppetmaster/base.pp b/manifests/puppetmaster/base.pp deleted file mode 100644 index 25709ea..0000000 --- a/manifests/puppetmaster/base.pp +++ /dev/null @@ -1,38 +0,0 @@ -class puppet::puppetmaster::base inherits puppet::base { - - File[puppet_config]{ - source => [ "puppet:///modules/site-puppet/master/puppet.conf", - "puppet:///modules/puppet/master/puppet.conf" ], - } - - if !$puppet_fileserverconfig { $puppet_fileserverconfig = '/etc/puppet/fileserver.conf' } - - file { "$puppet_fileserverconfig": - source => [ "puppet:///modules/site-puppet/master/${fqdn}/fileserver.conf", - "puppet:///modules/site-puppet/master/fileserver.conf", - "puppet:///modules/puppet/master/fileserver.conf" ], - owner => root, group => puppet, mode => 640; - } - - if $puppetmaster_storeconfigs { - include puppet::puppetmaster::storeconfigs - } - - - if $puppetmaster_mode == 'passenger' { - include puppet::puppetmaster::passenger - File[$puppet_fileserverconfig]{ - notify => Exec['notify_passenger_puppetmaster'], - } - File[puppet_config]{ - notify => Exec['notify_passenger_puppetmaster'], - } - } else { - File[$puppet_fileserverconfig]{ - notify => Service[puppetmaster], - } - File[puppet_config]{ - notify => Service[puppetmaster], - } - } -} diff --git a/manifests/puppetmaster/centos.pp b/manifests/puppetmaster/centos.pp deleted file mode 100644 index 2673a4d..0000000 --- a/manifests/puppetmaster/centos.pp +++ /dev/null @@ -1,12 +0,0 @@ -# manifests/puppetmaster/centos.pp -class puppet::puppetmaster::centos inherits puppet::puppetmaster::package { - - 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", - "puppet:///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 deleted file mode 100644 index 93ed8b9..0000000 --- a/manifests/puppetmaster/checklastrun.pp +++ /dev/null @@ -1,25 +0,0 @@ -class puppet::puppetmaster::checklastrun { - - $puppet_lastruncheck_ignorehosts_str = $puppet_lastruncheck_ignorehosts ? { - '' => '', - undef => '', - default => "--ignore-hosts ${puppet_lastruncheck_ignorehosts}" - } - - $puppet_lastruncheck_timeout_str = $puppet_lastruncheck_timeout ? { - '' => '', - undef => '', - default => "--timeout ${puppet_lastruncheck_timeout}" - } - - file{ - '/usr/local/sbin/puppetlast': - source => [ "puppet:///modules/puppet/master/lastruncheck" ], - owner => root, group => 0, mode => 0700; - - '/etc/cron.d/puppetlast.cron': - content => "${puppetmaster_lastruncheck_cron} root /usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${$puppet_lastruncheck_additionaloptions}\n", - require => File["/usr/local/sbin/puppetlast"], - owner => root, group => 0, mode => 0644, - } -} diff --git a/manifests/puppetmaster/checklastrun/disable.pp b/manifests/puppetmaster/checklastrun/disable.pp deleted file mode 100644 index 8fff212..0000000 --- a/manifests/puppetmaster/checklastrun/disable.pp +++ /dev/null @@ -1,12 +0,0 @@ -class puppet::puppetmaster::checklastrun::disable inherits puppet::puppetmaster::checklastrun { - - File['/usr/local/sbin/puppetlast']{ - source => undef, - ensure => absent, - } - - File['/etc/cron.d/puppetlast.cron']{ - ensure => absent, - } -} - diff --git a/manifests/puppetmaster/cleanup_reports.pp b/manifests/puppetmaster/cleanup_reports.pp deleted file mode 100644 index 005a4d7..0000000 --- a/manifests/puppetmaster/cleanup_reports.pp +++ /dev/null @@ -1,8 +0,0 @@ -class puppet::puppetmaster::cleanup_reports { - case $puppetmaster_reports_dir { '',undef: { $puppetmaster_reports_dir = '/var/lib/puppet/reports' } } - # clean up reports older than $puppetmaster_cleanup_reports days - file { '/etc/cron.daily/puppet_reports_cleanup.sh': - content => "#!/bin/bash\nfind ${puppetmaster_reports_dir} -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 deleted file mode 100644 index 8636223..0000000 --- a/manifests/puppetmaster/cleanup_reports/disable.pp +++ /dev/null @@ -1,6 +0,0 @@ -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 deleted file mode 100644 index 8d635ab..0000000 --- a/manifests/puppetmaster/cluster.pp +++ /dev/null @@ -1,5 +0,0 @@ -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 deleted file mode 100644 index 8c90153..0000000 --- a/manifests/puppetmaster/cluster/base.pp +++ /dev/null @@ -1,9 +0,0 @@ -class puppet::puppetmaster::cluster::base inherits puppet::puppetmaster::base { - - include mongrel, nginx - - File[puppet_config] { - require +> [ Package[mongrel], Package[nginx], File[nginx_config] ], - } -} - diff --git a/manifests/puppetmaster/debian.pp b/manifests/puppetmaster/debian.pp deleted file mode 100644 index 8cee0ea..0000000 --- a/manifests/puppetmaster/debian.pp +++ /dev/null @@ -1,19 +0,0 @@ -class puppet::puppetmaster::debian inherits puppet::puppetmaster::package { - - if $puppetmaster_mode != 'passenger' { - case $lsbdistcodename { - squeeze,sid: { - Service['puppetmaster'] { hasstatus => true, hasrestart => true } - } - } - } - - file { '/etc/default/puppetmaster': - source => [ "puppet:///modules/site-puppet/master/debian/${fqdn}/puppetmaster", - "puppet:///modules/site-puppet/master/debian/${domain}/puppetmaster", - "puppet:///modules/site-puppet/master/debian/puppetmaster", - "puppet:///modules/puppet/master/debian/puppetmaster" ], - notify => Service[puppetmaster], - owner => root, group => 0, mode => 0644; - } -} diff --git a/manifests/puppetmaster/hasdb.pp b/manifests/puppetmaster/hasdb.pp deleted file mode 100644 index 2aca0e6..0000000 --- a/manifests/puppetmaster/hasdb.pp +++ /dev/null @@ -1,17 +0,0 @@ -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' ) -{ - - 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, } } - } -} diff --git a/manifests/puppetmaster/hasdb/mysql.pp b/manifests/puppetmaster/hasdb/mysql.pp deleted file mode 100644 index 1ed122a..0000000 --- a/manifests/puppetmaster/hasdb/mysql.pp +++ /dev/null @@ -1,32 +0,0 @@ -# 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' ) -{ - @@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}", - } - - if $use_munin { - 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 deleted file mode 100644 index 2670203..0000000 --- a/manifests/puppetmaster/linux.pp +++ /dev/null @@ -1,18 +0,0 @@ -class puppet::puppetmaster::linux inherits puppet::linux { - - if $puppetmaster_mode == 'passenger' { - 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[puppet]{ - require +> Service[puppetmaster], - } -} diff --git a/manifests/puppetmaster/munin.pp b/manifests/puppetmaster/munin.pp deleted file mode 100644 index 4500b74..0000000 --- a/manifests/puppetmaster/munin.pp +++ /dev/null @@ -1,9 +0,0 @@ -class puppet::puppetmaster::munin { - - munin::plugin::deploy { - [ 'puppetmaster_memory', 'puppet_clients' ]: - source => "puppet/munin/puppet_", - config => "user root" - } - -} diff --git a/manifests/puppetmaster/package.pp b/manifests/puppetmaster/package.pp deleted file mode 100644 index 145792e..0000000 --- a/manifests/puppetmaster/package.pp +++ /dev/null @@ -1,9 +0,0 @@ -# manifests/puppetmaster/package.pp - -class puppet::puppetmaster::package inherits puppet::puppetmaster::linux { - case $operatingsystem { - centos: { include puppet::puppetmaster::package::centos } - debian: { include puppet::puppetmaster::package::debian } - default: { include puppet::puppetmaster::package::base } - } -} diff --git a/manifests/puppetmaster/package/base.pp b/manifests/puppetmaster/package/base.pp deleted file mode 100644 index 363f827..0000000 --- a/manifests/puppetmaster/package/base.pp +++ /dev/null @@ -1,10 +0,0 @@ -class puppet::puppetmaster::package::base inherits puppet::puppetmaster::package { - - package { 'puppetmaster': - ensure => present, - } - - Service['puppetmaster']{ - require +> Package['puppetmaster'], - } -} diff --git a/manifests/puppetmaster/package/centos.pp b/manifests/puppetmaster/package/centos.pp deleted file mode 100644 index 43361fd..0000000 --- a/manifests/puppetmaster/package/centos.pp +++ /dev/null @@ -1,7 +0,0 @@ -class puppet::puppetmaster::package::centos inherits puppet::puppetmaster::package::base { - - Package['puppetmaster']{ - name => 'puppet-server', - alias => 'puppetmaster', - } -} diff --git a/manifests/puppetmaster/package/debian.pp b/manifests/puppetmaster/package/debian.pp deleted file mode 100644 index 9d7d397..0000000 --- a/manifests/puppetmaster/package/debian.pp +++ /dev/null @@ -1,10 +0,0 @@ -class puppet::puppetmaster::package::debian inherits puppet::puppetmaster::package::base { - - package { 'puppetmaster-common': - ensure => present, - } - - Package['puppetmaster']{ - require => Package['puppetmaster-common'] - } -} diff --git a/manifests/puppetmaster/passenger.pp b/manifests/puppetmaster/passenger.pp deleted file mode 100644 index c4bc062..0000000 --- a/manifests/puppetmaster/passenger.pp +++ /dev/null @@ -1,20 +0,0 @@ -# class to use passenger for serving puppetmaster - -class puppet::puppetmaster::passenger inherits puppet::puppetmaster::base { - - include ::passenger - - # 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; - - '/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; - } -} diff --git a/manifests/puppetmaster/storeconfigs.pp b/manifests/puppetmaster/storeconfigs.pp deleted file mode 100644 index 63c1191..0000000 --- a/manifests/puppetmaster/storeconfigs.pp +++ /dev/null @@ -1,8 +0,0 @@ -# This class sets up the necessary ActiveRecord bits -# so storeconfigs works. - -class puppet::puppetmaster::storeconfigs { - include rails - include mysql::server - include mysql::client::ruby -} -- cgit v1.2.3