diff options
Diffstat (limited to 'manifests/puppetmaster')
-rw-r--r-- | manifests/puppetmaster/base.pp | 41 | ||||
-rw-r--r-- | manifests/puppetmaster/centos.pp | 12 | ||||
-rw-r--r-- | manifests/puppetmaster/checklastrun.pp | 36 | ||||
-rw-r--r-- | manifests/puppetmaster/checklastrun/disable.pp | 12 | ||||
-rw-r--r-- | manifests/puppetmaster/cleanup_reports.pp | 8 | ||||
-rw-r--r-- | manifests/puppetmaster/cleanup_reports/disable.pp | 6 | ||||
-rw-r--r-- | manifests/puppetmaster/cluster.pp | 5 | ||||
-rw-r--r-- | manifests/puppetmaster/cluster/base.pp | 9 | ||||
-rw-r--r-- | manifests/puppetmaster/debian.pp | 26 | ||||
-rw-r--r-- | manifests/puppetmaster/hasdb.pp | 17 | ||||
-rw-r--r-- | manifests/puppetmaster/hasdb/mysql.pp | 32 | ||||
-rw-r--r-- | manifests/puppetmaster/linux.pp | 23 | ||||
-rw-r--r-- | manifests/puppetmaster/munin.pp | 9 | ||||
-rw-r--r-- | manifests/puppetmaster/package.pp | 17 | ||||
-rw-r--r-- | manifests/puppetmaster/package/base.pp | 14 | ||||
-rw-r--r-- | manifests/puppetmaster/package/centos.pp | 7 | ||||
-rw-r--r-- | manifests/puppetmaster/package/debian.pp | 5 | ||||
-rw-r--r-- | manifests/puppetmaster/passenger.pp | 52 | ||||
-rw-r--r-- | manifests/puppetmaster/storeconfigs.pp | 8 |
19 files changed, 0 insertions, 339 deletions
diff --git a/manifests/puppetmaster/base.pp b/manifests/puppetmaster/base.pp deleted file mode 100644 index a313ff2..0000000 --- a/manifests/puppetmaster/base.pp +++ /dev/null @@ -1,41 +0,0 @@ -class puppet::puppetmaster::base inherits puppet::base { - - File[puppet_config]{ - source => [ - "puppet:///modules/site_puppet/master/${fqdn}/puppet.conf", - "puppet:///modules/site_puppet/master/puppet.conf", - "puppet:///modules/puppet/master/puppet.conf", - ], - } - - if !$puppet_fileserverconfig { $puppet_fileserverconfig = "${puppet::default_config_dir}/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 a6f5e23..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 e4278c7..0000000 --- a/manifests/puppetmaster/checklastrun.pp +++ /dev/null @@ -1,36 +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}" - } - - include ::cron - - file{ - '/usr/local/sbin/puppetlast': - source => [ 'puppet:///modules/puppet/master/lastruncheck' ], - owner => root, - group => 0, - mode => '0700'; - - '/etc/cron.d/puppetlast': - content => "${puppetmaster_lastruncheck_cron} root output=\$(/usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${$puppet_lastruncheck_additionaloptions} 2>&1) || echo \"\$output\"\n", - require => File['/usr/local/sbin/puppetlast'], - owner => root, - group => 0, - mode => '0644', - notify => Service['cron']; - - # Cleanup cronjob previously installed under a buggy name. - '/etc/cron.d/puppetlast.cron': - ensure => absent; - } -} diff --git a/manifests/puppetmaster/checklastrun/disable.pp b/manifests/puppetmaster/checklastrun/disable.pp deleted file mode 100644 index 8559280..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']{ - ensure => absent, - } -} - diff --git a/manifests/puppetmaster/cleanup_reports.pp b/manifests/puppetmaster/cleanup_reports.pp deleted file mode 100644 index 1f8c021..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': - 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 0b6da05..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']{ - 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 7d1626b..0000000 --- a/manifests/puppetmaster/debian.pp +++ /dev/null @@ -1,26 +0,0 @@ -class puppet::puppetmaster::debian inherits puppet::puppetmaster::linux { - - include puppet::puppetmaster::package - - if $puppetmaster_mode != 'passenger' { - if $puppet::base::puppet_majorversion >= '2.6' { - Service['puppetmaster'] { hasstatus => true, hasrestart => true } - } - } - - if $puppetmaster_mode == 'passenger' { - $puppetmaster_default_notify = 'Exec[notify_passenger_puppetmaster]' - } - - 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 => $puppetmaster_default_notify ? { - '' => Service[puppetmaster], - default => Exec['notify_passenger_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 39ca544..0000000 --- a/manifests/puppetmaster/linux.pp +++ /dev/null @@ -1,23 +0,0 @@ -class puppet::puppetmaster::linux inherits puppet::linux { - - if $puppetmaster_mode == 'passenger' { - - require('apache::base') - - exec { 'notify_passenger_puppetmaster': - refreshonly => true, - # command => '/usr/bin/touch /etc/puppet/rack/tmp/restart.txt && sleep 1 && /bin/rm /etc/puppet/rack/tmp/restart.txt', - command => '/etc/init.d/apache2 reload', - } - - } 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 aef3121..0000000 --- a/manifests/puppetmaster/package.pp +++ /dev/null @@ -1,17 +0,0 @@ -# manifests/puppetmaster/package.pp - -class puppet::puppetmaster::package { - case $operatingsystem { - centos: { - if $puppetmaster_ensure_version { - warn('$puppetmaster_ensure_version is not supported for this operatingsystem') - } - include puppet::puppetmaster::package::centos } - debian: { include puppet::puppetmaster::package::debian } - default: { - if $puppetmaster_ensure_version { - warn('$puppetmaster_ensure_version is not supported for this operatingsystem') - } - include puppet::puppetmaster::package::base } - } -} diff --git a/manifests/puppetmaster/package/base.pp b/manifests/puppetmaster/package/base.pp deleted file mode 100644 index ba557c4..0000000 --- a/manifests/puppetmaster/package/base.pp +++ /dev/null @@ -1,14 +0,0 @@ -class puppet::puppetmaster::package::base inherits puppet::puppetmaster::linux { - - include puppet::puppetmaster::package - - package { 'puppetmaster': - ensure => present, - } - - if $puppetmaster_mode != 'passenger' { - 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 629d57b..0000000 --- a/manifests/puppetmaster/package/debian.pp +++ /dev/null @@ -1,5 +0,0 @@ -class puppet::puppetmaster::package::debian { - - include puppet::puppetmaster::package::base - -} diff --git a/manifests/puppetmaster/passenger.pp b/manifests/puppetmaster/passenger.pp deleted file mode 100644 index 4361412..0000000 --- a/manifests/puppetmaster/passenger.pp +++ /dev/null @@ -1,52 +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 - - case $::operatingsystem { - debian: { - package { 'puppetmaster-passenger': ensure => installed } - file { - '/usr/share/puppet/rack/puppetmasterd/config.ru': - source => [ 'puppet:///modules/site_puppet/master/config.ru', - 'puppet:///modules/puppet/master/config.ru' ], - owner => puppet, group => 0, mode => '0644'; - } - - if !defined('apt') { - include apt - } - - $puppet_passenger_snippet = $puppetmaster_ensure_version ? { - undef => absent, - default => present, - } - - apt::preferences_snippet { - 'puppet_passenger': - ensure => $puppet_passenger_snippet, - package => 'puppet*', - pin => "version $puppetmaster_ensure_version", - priority => 2000, - notify => Exec['refresh_apt'], - before => Package['puppetmaster']; - } - } - default: { - 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 -} |