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/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 ++++++++ 19 files changed, 266 insertions(+) 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 (limited to 'manifests/master') 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 +} -- cgit v1.2.3 From a83290235e9da22d05de814b22e265f53a0dc6bb Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 10 Jun 2012 16:20:01 -0300 Subject: use proper variable name --- manifests/master/base.pp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/base.pp b/manifests/master/base.pp index 80fe8e0..6e8efe4 100644 --- a/manifests/master/base.pp +++ b/manifests/master/base.pp @@ -1,6 +1,6 @@ class puppet::master::base inherits puppet::base { - file { $puppet::master::fileserverconfig: + file { $puppet::master::fileserver: source => [ "puppet:///modules/site_puppet/master/${::fqdn}/fileserver.conf", "puppet:///modules/site_puppet/master/fileserver.conf", "puppet:///modules/puppet/master/fileserver.conf" ], @@ -14,14 +14,14 @@ class puppet::master::base inherits puppet::base { if $puppet::master::mode == 'passenger' { include puppet::master::passenger - File[$puppet::master::fileserverconfig]{ + File[$puppet::master::fileserver]{ notify => Exec['notify_passenger_puppetmaster'], } File[puppet_config]{ notify => Exec['notify_passenger_puppetmaster'], } } else { - File[$puppet::master::fileserverconfig]{ + File[$puppet::master::fileserver]{ notify => Service[puppetmaster], } File[puppet_config]{ -- cgit v1.2.3 From 094a8faa46f842bc99adbdc207aace375517afba Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 10 Jun 2012 16:56:31 -0300 Subject: use another source for the master --- manifests/master/base.pp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'manifests/master') diff --git a/manifests/master/base.pp b/manifests/master/base.pp index 6e8efe4..390d9b5 100644 --- a/manifests/master/base.pp +++ b/manifests/master/base.pp @@ -7,6 +7,12 @@ class puppet::master::base inherits puppet::base { owner => root, group => puppet, mode => 640; } + 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::master::storeconfigs { include puppet::master::storeconfigs } -- cgit v1.2.3 From a088356e96de56839612363a0b52f3687733431a Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 10 Jun 2012 17:41:38 -0300 Subject: fix cron time --- manifests/master/checklastrun.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/checklastrun.pp b/manifests/master/checklastrun.pp index bde5a97..b80bb56 100644 --- a/manifests/master/checklastrun.pp +++ b/manifests/master/checklastrun.pp @@ -18,7 +18,7 @@ class puppet::master::checklastrun { 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", + content => "${puppet::master::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, } -- cgit v1.2.3 From e59aec0fadd435cff42dceeb147d4eb85fdc9484 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 13 Jun 2012 21:23:36 -0300 Subject: take hiera out of the params --- manifests/master/hasdb.pp | 4 ++-- manifests/master/hasdb/mysql.pp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/hasdb.pp b/manifests/master/hasdb.pp index d3bf388..66aeb62 100644 --- a/manifests/master/hasdb.pp +++ b/manifests/master/hasdb.pp @@ -5,11 +5,11 @@ define puppet::master::hasdb ( # this is needed due to the collection of the databases $dbhostfqdn = $::fqdn, $dbuser = 'puppet', - $dbpwd = hiera('puppet_master_storeconfigs_password',false), + $dbpwd = false, $dbconnectinghost = 'locahost' ) { - if !$dbpwd { fail("No \$puppet_master_storeconfig_password is set, please set it in your hiera database") } + if !$dbpwd { fail('No $puppet_master_storeconfig_password is set, please pass it the master class') } 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 index bc15756..5f4985a 100644 --- a/manifests/master/hasdb/mysql.pp +++ b/manifests/master/hasdb/mysql.pp @@ -23,7 +23,7 @@ define puppet::master::hasdb::mysql ( tag => "mysql_${dbhostfqdn}", } - if hiera('use_munin',false) { + if $puppet::master::manage_munin { munin::plugin::deploy { 'puppetresources': source => "puppet/munin/puppetresources.mysql", config => "env.mysqlopts --user=$dbuser --password=$dbpwd -h $dbhost\nenv.puppetdb $dbname", -- cgit v1.2.3 From bad29d3812a9e02a03df35f5b21feac7aa1360f6 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 6 Dec 2012 23:14:22 +0100 Subject: use correct location to get logs --- manifests/master/munin.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/munin.pp b/manifests/master/munin.pp index 8046162..89aa5f2 100644 --- a/manifests/master/munin.pp +++ b/manifests/master/munin.pp @@ -3,7 +3,8 @@ class puppet::master::munin { munin::plugin::deploy { [ 'puppetmaster_memory', 'puppet_clients' ]: source => "puppet/munin/puppet_", - config => "user root" + config => "user root +env.logfile /var/log/puppet/puppetmaster.log" } } -- cgit v1.2.3 From 26c67fe5ebf4c993f796d1b5de50015dfbb3bca8 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 7 Dec 2012 12:32:51 +0100 Subject: correct env var --- manifests/master/munin.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/munin.pp b/manifests/master/munin.pp index 89aa5f2..b455240 100644 --- a/manifests/master/munin.pp +++ b/manifests/master/munin.pp @@ -4,7 +4,7 @@ class puppet::master::munin { [ 'puppetmaster_memory', 'puppet_clients' ]: source => "puppet/munin/puppet_", config => "user root -env.logfile /var/log/puppet/puppetmaster.log" +env.puppet_logfile /var/log/puppet/puppetmaster.log" } } -- cgit v1.2.3 From 56c15eb79702694ecd0a413958c2e5498a794f0a Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 7 Dec 2012 12:56:28 +0100 Subject: improve puppet munin plugin --- manifests/master/munin.pp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/munin.pp b/manifests/master/munin.pp index b455240..ca6fddc 100644 --- a/manifests/master/munin.pp +++ b/manifests/master/munin.pp @@ -1,10 +1,13 @@ +# deploy puppet munin plugin class puppet::master::munin { - - munin::plugin::deploy { - [ 'puppetmaster_memory', 'puppet_clients' ]: - source => "puppet/munin/puppet_", - config => "user root -env.puppet_logfile /var/log/puppet/puppetmaster.log" + munin::plugin::deploy{'puppet_': + ensure => absent, + source => 'puppet/munin/puppet_'; + } + munin::plugin{ + ['puppet_clients','puppet_mem']: + ensure => 'puppet_', + require => Munin::Plugin::Deploy['puppet_'], + config => 'user root'; } - } -- cgit v1.2.3 From 9eb6c4f0e5fec4d24b0480b186ce83f490d68b80 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 16:00:05 +0200 Subject: fix inheriting --- manifests/master/passenger.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/passenger.pp b/manifests/master/passenger.pp index 03e1aa4..0aa489b 100644 --- a/manifests/master/passenger.pp +++ b/manifests/master/passenger.pp @@ -1,6 +1,6 @@ # class to use passenger for serving puppetmaster -class puppet::master::passenger inherits puppet::master::base { +class puppet::master::passenger inherits puppet::master { include ::passenger -- cgit v1.2.3 From 4fabfbd53cfb7c35cf7ad9ff03b6b38d4daed7b4 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 16:04:07 +0200 Subject: if it runs with passenger there is no such service --- manifests/master/centos.pp | 19 ++++++++++++------- manifests/master/linux.pp | 6 +++--- manifests/master/package/base.pp | 6 ++++-- 3 files changed, 19 insertions(+), 12 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/centos.pp b/manifests/master/centos.pp index 82a8436..b684174 100644 --- a/manifests/master/centos.pp +++ b/manifests/master/centos.pp @@ -1,12 +1,17 @@ # 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; + 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' ], + owner => root, + group => 0, + mode => '0644'; + } + if $puppet::master::mode != 'passenger' { + File['/etc/sysconfig/puppetmaster']{ + notify => Service[puppetmaster], + } } } diff --git a/manifests/master/linux.pp b/manifests/master/linux.pp index d2fb5b1..e52db63 100644 --- a/manifests/master/linux.pp +++ b/manifests/master/linux.pp @@ -11,8 +11,8 @@ class puppet::master::linux inherits puppet::linux { enable => true, require => [ Package[puppet] ], } - } - Service[puppet]{ - require +> Service[puppetmaster], + Service[puppet]{ + require +> Service[puppetmaster], + } } } diff --git a/manifests/master/package/base.pp b/manifests/master/package/base.pp index 0a1fa33..2851747 100644 --- a/manifests/master/package/base.pp +++ b/manifests/master/package/base.pp @@ -4,7 +4,9 @@ class puppet::master::package::base inherits puppet::master::package { ensure => $puppet::ensure_version, } - Service['puppetmaster']{ - require +> Package['puppetmaster'], + if $puppet::master::mode != 'passenger' { + Service['puppetmaster']{ + require +> Package['puppetmaster'], + } } } -- cgit v1.2.3 From d2852466f2961f9af46057f9410b5d96457337f8 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 21:56:53 +0200 Subject: add a simple dashboard setup --- manifests/master/dashboard.pp | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 manifests/master/dashboard.pp (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp new file mode 100644 index 0000000..16d796e --- /dev/null +++ b/manifests/master/dashboard.pp @@ -0,0 +1,47 @@ +class puppet::master::dashboard( + $settings = {}, + $service = true, + $mysql_password, +) { + + package{'puppet-dashboard': + ensure => installed, + } -> mysql::default_database{ + 'dashboard': + password => $mysql_password; + } -> file{ + '/usr/share/puppet-dashboard/config/database.yaml': + content => template('puppet/master/dashboard/database.yaml.erb'), + owner => 'puppet-dashboard', + group => 'puppet-dashboard', + mode => '0640'; + '/usr/share/puppet-dashboard/config/settings.yaml': + content => template('puppet/master/dashboard/settings.yaml.erb'), + owner => 'puppet-dashboard', + group => 'puppet-dashboard', + mode => '0640'; + } ~> exec{ + 'rake RAILS_ENV=production db:migrate': + cwd => '/usr/share/puppet-dashboard', + user => 'puppet-dashboard', + refreshonly => true; + } -> service{ + 'puppet-dashboard-workers': + ensure => running, + enable => true; + } + + service{'puppet-dashboard': } + if $service { + Service['puppet-dashboard']{ + ensure => running, + enable => true, + subscribe => File['/usr/share/puppet-dashboard/config/database.yaml','/usr/share/puppet-dashboard/config/settings.yaml'], + } + } else { + Service['puppet-dashboard']{ + ensure => stopped, + enable => false, + } + } +} -- cgit v1.2.3 From 7efe3fd46d97ad1a3be52e4b642f51bace5ac35e Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 22:04:11 +0200 Subject: correct naming --- manifests/master/dashboard.pp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp index 16d796e..951ece2 100644 --- a/manifests/master/dashboard.pp +++ b/manifests/master/dashboard.pp @@ -10,14 +10,14 @@ class puppet::master::dashboard( 'dashboard': password => $mysql_password; } -> file{ - '/usr/share/puppet-dashboard/config/database.yaml': - content => template('puppet/master/dashboard/database.yaml.erb'), - owner => 'puppet-dashboard', + '/usr/share/puppet-dashboard/config/database.yml': + content => template('puppet/master/dashboard/database.yml.erb'), + owner => root, group => 'puppet-dashboard', mode => '0640'; - '/usr/share/puppet-dashboard/config/settings.yaml': - content => template('puppet/master/dashboard/settings.yaml.erb'), - owner => 'puppet-dashboard', + '/usr/share/puppet-dashboard/config/settings.yml': + content => template('puppet/master/dashboard/settings.yml.erb'), + owner => root, group => 'puppet-dashboard', mode => '0640'; } ~> exec{ @@ -36,7 +36,7 @@ class puppet::master::dashboard( Service['puppet-dashboard']{ ensure => running, enable => true, - subscribe => File['/usr/share/puppet-dashboard/config/database.yaml','/usr/share/puppet-dashboard/config/settings.yaml'], + subscribe => File['/usr/share/puppet-dashboard/config/database.yml','/usr/share/puppet-dashboard/config/settings.yml'], } } else { Service['puppet-dashboard']{ -- cgit v1.2.3 From 475e2ea70e95cffad367865b90f684e14fd5f642 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 22:20:30 +0200 Subject: so far this is only localhost --- manifests/master/dashboard.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp index 951ece2..400142e 100644 --- a/manifests/master/dashboard.pp +++ b/manifests/master/dashboard.pp @@ -8,7 +8,8 @@ class puppet::master::dashboard( ensure => installed, } -> mysql::default_database{ 'dashboard': - password => $mysql_password; + password => $mysql_password, + host => '127.0.0.1'; } -> file{ '/usr/share/puppet-dashboard/config/database.yml': content => template('puppet/master/dashboard/database.yml.erb'), -- cgit v1.2.3 From 98a7e0361ff7523fa86e460e7e2f03b37fd53956 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 20 May 2013 22:28:14 +0200 Subject: this should be passed as a mysql hash here --- manifests/master/dashboard.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp index 400142e..7c02247 100644 --- a/manifests/master/dashboard.pp +++ b/manifests/master/dashboard.pp @@ -8,7 +8,7 @@ class puppet::master::dashboard( ensure => installed, } -> mysql::default_database{ 'dashboard': - password => $mysql_password, + password => mysql_password($mysql_password), host => '127.0.0.1'; } -> file{ '/usr/share/puppet-dashboard/config/database.yml': -- cgit v1.2.3 From 98c84c83bdeec6ca245318497597be3c74633990 Mon Sep 17 00:00:00 2001 From: mh Date: Mon, 5 Aug 2013 12:29:36 +0200 Subject: silence the lastrun output on only successfull runs --- manifests/master/checklastrun.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests/master') diff --git a/manifests/master/checklastrun.pp b/manifests/master/checklastrun.pp index b80bb56..5375cc0 100644 --- a/manifests/master/checklastrun.pp +++ b/manifests/master/checklastrun.pp @@ -18,7 +18,7 @@ class puppet::master::checklastrun { owner => root, group => 0, mode => 0700; '/etc/cron.d/puppetlast.cron': - content => "${puppet::master::lastruncheck_cron} root /usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${puppet::master::lastruncheck_additionaloptions}\n", + content => "${puppet::master::lastruncheck_cron} root /usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${puppet::master::lastruncheck_additionaloptions} | grep -Ev '^OK: '\n", require => File["/usr/local/sbin/puppetlast"], owner => root, group => 0, mode => 0644, } -- cgit v1.2.3 From e968708b7ad8420453baf085862edc2c92b52c9b Mon Sep 17 00:00:00 2001 From: mh Date: Sun, 25 Aug 2013 16:07:34 +0200 Subject: add cleanup job --- manifests/master/dashboard.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp index 7c02247..df8bcf8 100644 --- a/manifests/master/dashboard.pp +++ b/manifests/master/dashboard.pp @@ -32,6 +32,18 @@ class puppet::master::dashboard( enable => true; } + file{'/etc/cron.daily/puppet-dashboard_cleanup': + content => "#/bin/bash +cd /usr/share/puppet-dashboard +RAILS_ENV=production /usr/bin/rake reports:prune upto=1 unit=mon >> /usr/share/puppet-dashboard/log/cron.log +RAILS_ENV=production /usr/bin/rake reports:prune:orphaned >> /usr/share/puppet-dashboard/log/cron.log +RAILS_ENV=production /usr/bin/rake db:raw:optimize >> /usr/share/puppet-dashboard/log/cron.log\n", + owner => 'puppet-dashboard', + group => 'puppet-dashboard', + mode => '0755', + require => Service['puppet-dashboard-workers']; + } + service{'puppet-dashboard': } if $service { Service['puppet-dashboard']{ -- cgit v1.2.3 From f7a31af7c4c44ec11ff1fc61c466c4476e9f093c Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 5 Dec 2013 09:53:51 +0100 Subject: make it possible to consume an external database --- manifests/master/dashboard.pp | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp index df8bcf8..e3d56b5 100644 --- a/manifests/master/dashboard.pp +++ b/manifests/master/dashboard.pp @@ -1,21 +1,32 @@ +# simple installation of a puppet dashboard class puppet::master::dashboard( $settings = {}, $service = true, + $mysql_host = '127.0.0.1', $mysql_password, ) { package{'puppet-dashboard': ensure => installed, - } -> mysql::default_database{ - 'dashboard': - password => mysql_password($mysql_password), - host => '127.0.0.1'; - } -> file{ + } + + if $mysql_host == '127.0.0.1' { + mysql::default_database{ + 'dashboard': + password => mysql_password($mysql_password), + host => '127.0.0.1', + require => Package['puppet-dashboard'], + before => File['/usr/share/puppet-dashboard/config/database.yml'], + } + } + + file{ '/usr/share/puppet-dashboard/config/database.yml': content => template('puppet/master/dashboard/database.yml.erb'), owner => root, group => 'puppet-dashboard', - mode => '0640'; + mode => '0640', + require => Package['puppet-dashboard']; '/usr/share/puppet-dashboard/config/settings.yml': content => template('puppet/master/dashboard/settings.yml.erb'), owner => root, @@ -33,7 +44,7 @@ class puppet::master::dashboard( } file{'/etc/cron.daily/puppet-dashboard_cleanup': - content => "#/bin/bash + content => "#/bin/bash cd /usr/share/puppet-dashboard RAILS_ENV=production /usr/bin/rake reports:prune upto=1 unit=mon >> /usr/share/puppet-dashboard/log/cron.log RAILS_ENV=production /usr/bin/rake reports:prune:orphaned >> /usr/share/puppet-dashboard/log/cron.log @@ -47,8 +58,8 @@ RAILS_ENV=production /usr/bin/rake db:raw:optimize >> /usr/share/puppet-dashboar service{'puppet-dashboard': } if $service { Service['puppet-dashboard']{ - ensure => running, - enable => true, + ensure => running, + enable => true, subscribe => File['/usr/share/puppet-dashboard/config/database.yml','/usr/share/puppet-dashboard/config/settings.yml'], } } else { -- cgit v1.2.3 From e5e2211dc0baf540d62eaf1df8775d6b05193da1 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 5 Dec 2013 12:11:35 +0100 Subject: fix source if we pass config_content --- manifests/master/base.pp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/base.pp b/manifests/master/base.pp index 390d9b5..38658ca 100644 --- a/manifests/master/base.pp +++ b/manifests/master/base.pp @@ -1,16 +1,19 @@ +# overwrite a few things for the master class puppet::master::base inherits puppet::base { file { $puppet::master::fileserver: source => [ "puppet:///modules/site_puppet/master/${::fqdn}/fileserver.conf", - "puppet:///modules/site_puppet/master/fileserver.conf", - "puppet:///modules/puppet/master/fileserver.conf" ], + 'puppet:///modules/site_puppet/master/fileserver.conf', + 'puppet:///modules/puppet/master/fileserver.conf' ], owner => root, group => puppet, mode => 640; } - 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::master::config_content { + 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::master::storeconfigs { -- cgit v1.2.3 From cf73e775ea97cc53e2671efcc0ae03903a101bd3 Mon Sep 17 00:00:00 2001 From: mh Date: Thu, 5 Dec 2013 12:12:19 +0100 Subject: linting --- manifests/master/base.pp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/base.pp b/manifests/master/base.pp index 38658ca..4931264 100644 --- a/manifests/master/base.pp +++ b/manifests/master/base.pp @@ -2,10 +2,12 @@ class puppet::master::base inherits puppet::base { file { $puppet::master::fileserver: - source => [ "puppet:///modules/site_puppet/master/${::fqdn}/fileserver.conf", + 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; + owner => root, + group => puppet, + mode => '0640'; } if !$puppet::master::config_content { -- cgit v1.2.3 From 7bd09350025f19c4e2e79bafe6e91896b646a6b9 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 9 Jul 2014 23:21:09 +0200 Subject: get rid off lsb facts --- manifests/master/debian.pp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/debian.pp b/manifests/master/debian.pp index f51a319..5748683 100644 --- a/manifests/master/debian.pp +++ b/manifests/master/debian.pp @@ -1,19 +1,18 @@ +# debian master class puppet::master::debian inherits puppet::master::package { if $puppet::master::mode != 'passenger' { - case $::lsbdistcodename { - squeeze,sid: { - Service['puppetmaster'] { hasstatus => true, hasrestart => true } - } - } + Service['puppetmaster'] { hasstatus => true, hasrestart => true } } file { '/etc/default/puppetmaster': - source => [ "puppet:///modules/site_puppet/master/debian/${::fqdn}/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; + 'puppet:///modules/site_puppet/master/debian/puppetmaster', + 'puppet:///modules/puppet/master/debian/puppetmaster' ], + notify => Service[puppetmaster], + owner => root, + group => 0, + mode => '0644'; } } -- cgit v1.2.3 From c80c781fa05f94ac1c8631e068af98a6839b0a4a Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 30 Aug 2014 13:17:55 +0200 Subject: do privilege drop properly within cron --- manifests/master/dashboard.pp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/dashboard.pp b/manifests/master/dashboard.pp index e3d56b5..4cbee12 100644 --- a/manifests/master/dashboard.pp +++ b/manifests/master/dashboard.pp @@ -46,11 +46,11 @@ class puppet::master::dashboard( file{'/etc/cron.daily/puppet-dashboard_cleanup': content => "#/bin/bash cd /usr/share/puppet-dashboard -RAILS_ENV=production /usr/bin/rake reports:prune upto=1 unit=mon >> /usr/share/puppet-dashboard/log/cron.log -RAILS_ENV=production /usr/bin/rake reports:prune:orphaned >> /usr/share/puppet-dashboard/log/cron.log -RAILS_ENV=production /usr/bin/rake db:raw:optimize >> /usr/share/puppet-dashboard/log/cron.log\n", - owner => 'puppet-dashboard', - group => 'puppet-dashboard', +su - puppet-dashboard -s /bin/bash -c 'RAILS_ENV=production /usr/bin/rake reports:prune upto=1 unit=mon >> /usr/share/puppet-dashboard/log/cron.log' +su - puppet-dashboard -s /bin/bash -c 'RAILS_ENV=production /usr/bin/rake reports:prune:orphaned >> /usr/share/puppet-dashboard/log/cron.log' +su - puppet-dashboard -s /bin/bash -c 'RAILS_ENV=production /usr/bin/rake db:raw:optimize >> /usr/share/puppet-dashboard/log/cron.log'\n", + owner => 'root', + group => 0, mode => '0755', require => Service['puppet-dashboard-workers']; } @@ -60,7 +60,8 @@ RAILS_ENV=production /usr/bin/rake db:raw:optimize >> /usr/share/puppet-dashboar Service['puppet-dashboard']{ ensure => running, enable => true, - subscribe => File['/usr/share/puppet-dashboard/config/database.yml','/usr/share/puppet-dashboard/config/settings.yml'], + subscribe => File['/usr/share/puppet-dashboard/config/database.yml', + '/usr/share/puppet-dashboard/config/settings.yml'], } } else { Service['puppet-dashboard']{ -- cgit v1.2.3 From b8bd7e5c9208feb09019a395374a04437a8122a4 Mon Sep 17 00:00:00 2001 From: mh Date: Sat, 30 Aug 2014 13:24:04 +0200 Subject: fix cron name globally + linting --- manifests/master/checklastrun.pp | 16 ++++++++++------ manifests/master/checklastrun/disable.pp | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/checklastrun.pp b/manifests/master/checklastrun.pp index 5375cc0..2544acc 100644 --- a/manifests/master/checklastrun.pp +++ b/manifests/master/checklastrun.pp @@ -1,3 +1,4 @@ +# check for last run class puppet::master::checklastrun { $puppet_lastruncheck_ignorehosts_str = $puppet::master::lastruncheck_ignorehosts ? { @@ -14,12 +15,15 @@ class puppet::master::checklastrun { file{ '/usr/local/sbin/puppetlast': - source => [ "puppet:///modules/puppet/master/lastruncheck" ], - owner => root, group => 0, mode => 0700; - - '/etc/cron.d/puppetlast.cron': + source => 'puppet:///modules/puppet/master/lastruncheck', + owner => root, + group => 0, + mode => '0700'; + '/etc/cron.d/puppetlast': content => "${puppet::master::lastruncheck_cron} root /usr/local/sbin/puppetlast ${puppet_lastruncheck_timeout_str} ${puppet_lastruncheck_ignorehosts_str} ${puppet::master::lastruncheck_additionaloptions} | grep -Ev '^OK: '\n", - require => File["/usr/local/sbin/puppetlast"], - owner => root, group => 0, mode => 0644, + 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 index 655253d..e5a7198 100644 --- a/manifests/master/checklastrun/disable.pp +++ b/manifests/master/checklastrun/disable.pp @@ -1,3 +1,4 @@ +# disable the check class puppet::master::checklastrun::disable inherits puppet::master::checklastrun { File['/usr/local/sbin/puppetlast']{ @@ -5,7 +6,7 @@ class puppet::master::checklastrun::disable inherits puppet::master::checklastru ensure => absent, } - File['/etc/cron.d/puppetlast.cron']{ + File['/etc/cron.d/puppetlast']{ ensure => absent, } } -- cgit v1.2.3 From 4f8e144c52f919855a41d5203f9bec7788784372 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 5 Sep 2014 11:05:23 +0200 Subject: make tmp dir puppet writeable for cache invalidations --- manifests/master/passenger.pp | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/passenger.pp b/manifests/master/passenger.pp index 0aa489b..9a961f9 100644 --- a/manifests/master/passenger.pp +++ b/manifests/master/passenger.pp @@ -1,20 +1,26 @@ # class to use passenger for serving puppetmaster - class puppet::master::passenger inherits puppet::master { 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', '/etc/puppet/rack/public' ]: + ensure => directory, + owner => root, + group => 0, + mode => '0755'; + '/etc/puppet/rack/tmp': + ensure => directory, + owner => puppet, + group => 0, + mode => '0750'; '/etc/puppet/rack/config.ru': - source => [ "puppet:///modules/site_puppet/master/config.ru", + source => ["puppet:///modules/site_puppet/master/config.ru", "puppet:///modules/puppet/master/config.ru" ], - owner => puppet, group => 0, mode => 0644; + owner => puppet, + group => 0, + mode => '0644'; } } -- cgit v1.2.3 From fe3115c8bee9bd1124fc615d91c17f2762c2a714 Mon Sep 17 00:00:00 2001 From: mh Date: Fri, 5 Sep 2014 11:05:49 +0200 Subject: linting --- manifests/master/passenger.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'manifests/master') diff --git a/manifests/master/passenger.pp b/manifests/master/passenger.pp index 9a961f9..cf90b1d 100644 --- a/manifests/master/passenger.pp +++ b/manifests/master/passenger.pp @@ -17,8 +17,8 @@ class puppet::master::passenger inherits puppet::master { group => 0, mode => '0750'; '/etc/puppet/rack/config.ru': - source => ["puppet:///modules/site_puppet/master/config.ru", - "puppet:///modules/puppet/master/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 From 8584340c2aeac7d97a78b8303ab377b5049b80c2 Mon Sep 17 00:00:00 2001 From: mh Date: Wed, 17 Dec 2014 19:58:59 +0100 Subject: add hiera management file --- manifests/master/hiera.pp | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 manifests/master/hiera.pp (limited to 'manifests/master') diff --git a/manifests/master/hiera.pp b/manifests/master/hiera.pp new file mode 100644 index 0000000..1fe5f24 --- /dev/null +++ b/manifests/master/hiera.pp @@ -0,0 +1,12 @@ +# manage hiera file +class puppet::master::hiera { + if versioncmp($::puppetversion,'3.0') < 0 { + require rubygems::hiera_puppet + } + file{"${settings::confdir}/hiera.yaml": + source => 'puppet:///modules/site_puppet/master/hiera.yaml', + owner => root, + group => puppet, + mode => '0640'; + } +} -- cgit v1.2.3