diff options
-rw-r--r-- | manifests/ca.pp | 2 | ||||
-rw-r--r-- | manifests/daemon.pp (renamed from manifests/puppetd.pp) | 2 | ||||
-rw-r--r-- | manifests/init.pp | 53 | ||||
-rw-r--r-- | manifests/master.pp (renamed from manifests/puppetmasterd.pp) | 2 | ||||
-rw-r--r-- | manifests/master/mongrel.pp | 17 | ||||
-rw-r--r-- | manifests/master/mongrel/disabled.pp | 16 | ||||
-rw-r--r-- | manifests/master/passenger.pp | 2 | ||||
-rw-r--r-- | manifests/puppet.pp | 48 |
8 files changed, 68 insertions, 74 deletions
diff --git a/manifests/ca.pp b/manifests/ca.pp index 8ec6b2e..61e82b8 100644 --- a/manifests/ca.pp +++ b/manifests/ca.pp @@ -1,4 +1,4 @@ -class puppetmaster::ca { +class puppet::ca { file { '/var/lib/puppetmaster/ssl/ca': ensure => directory, diff --git a/manifests/puppetd.pp b/manifests/daemon.pp index 62aad13..27f3651 100644 --- a/manifests/puppetd.pp +++ b/manifests/daemon.pp @@ -1,5 +1,5 @@ # handles puppetd service -class puppetd( +class puppet::daemon( $master = false, $main_master = false, ) { diff --git a/manifests/init.pp b/manifests/init.pp index b434cce..5dd5dd9 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,5 +1,48 @@ -# This file imports the files for puppet puppet module. -import "ca.pp" -import "puppet.pp" -import "puppetd.pp" -import "puppetmasterd.pp" +# This classes manage a puppet installation, and provide for a puppetd +# service and a puppetmasterd service, the latter constantly updated by a +# cron-job which git-pushes from '/var/git/repositories/puppet.git'. + +# guarantees puppet user, group and ownerships +class puppet { + user { "puppet": + ensure => present, + allowdupe => false, + } + + group { "puppet": + ensure => present, + allowdupe => false, + } + + file { "/etc/puppet": + ensure => directory, + owner => puppet, + group => puppet, + mode => 0640, + require => User["puppet"], + } + + file { "/etc/puppet/manifests": + ensure => directory, + owner => puppet, + group => puppet, + recurse => inf, + require => User["puppet"], + } + + file { "/etc/puppet/modules": + ensure => directory, + owner => puppet, + group => puppet, + recurse => inf, + require => User["puppet"], + } + + file { "/etc/puppet/templates": + ensure => directory, + owner => puppet, + group => puppet, + recurse => inf, + require => User["puppet"], + } +} diff --git a/manifests/puppetmasterd.pp b/manifests/master.pp index 53e49bc..d3f3e88 100644 --- a/manifests/puppetmasterd.pp +++ b/manifests/master.pp @@ -1,5 +1,5 @@ # handles puppetmasterd service -class puppetmasterd( +class puppet::master( $main = false ) { diff --git a/manifests/master/mongrel.pp b/manifests/master/mongrel.pp index 987c333..5cdf551 100644 --- a/manifests/master/mongrel.pp +++ b/manifests/master/mongrel.pp @@ -30,20 +30,3 @@ class puppet::master::mongrel { } } - -class puppet::master::mongrel::disabled inherits puppet::master::mongrel { - include nginx::puppetmaster::disabled - - Service['puppetmaster'] { - enable => false, - ensure => stopped, - } - - Package['puppetmaster', 'mongrel'] { - ensure => absent, - } - - File['/etc/cron.d/puppetmaster'] { - ensure => absent, - } -} diff --git a/manifests/master/mongrel/disabled.pp b/manifests/master/mongrel/disabled.pp new file mode 100644 index 0000000..84edfd3 --- /dev/null +++ b/manifests/master/mongrel/disabled.pp @@ -0,0 +1,16 @@ +class puppet::master::mongrel::disabled inherits puppet::master::mongrel { + include nginx::puppetmaster::disabled + + Service['puppetmaster'] { + enable => false, + ensure => stopped, + } + + Package['puppetmaster', 'mongrel'] { + ensure => absent, + } + + File['/etc/cron.d/puppetmaster'] { + ensure => absent, + } +} diff --git a/manifests/master/passenger.pp b/manifests/master/passenger.pp index 221a7a2..01f1dac 100644 --- a/manifests/master/passenger.pp +++ b/manifests/master/passenger.pp @@ -4,7 +4,7 @@ class puppet::master::passenger { include puppet::master::mongrel::disabled # then include puppet class - include puppetd + include puppet::daemon package { 'puppetmaster-passenger': ensure => installed, diff --git a/manifests/puppet.pp b/manifests/puppet.pp deleted file mode 100644 index 5dd5dd9..0000000 --- a/manifests/puppet.pp +++ /dev/null @@ -1,48 +0,0 @@ -# This classes manage a puppet installation, and provide for a puppetd -# service and a puppetmasterd service, the latter constantly updated by a -# cron-job which git-pushes from '/var/git/repositories/puppet.git'. - -# guarantees puppet user, group and ownerships -class puppet { - user { "puppet": - ensure => present, - allowdupe => false, - } - - group { "puppet": - ensure => present, - allowdupe => false, - } - - file { "/etc/puppet": - ensure => directory, - owner => puppet, - group => puppet, - mode => 0640, - require => User["puppet"], - } - - file { "/etc/puppet/manifests": - ensure => directory, - owner => puppet, - group => puppet, - recurse => inf, - require => User["puppet"], - } - - file { "/etc/puppet/modules": - ensure => directory, - owner => puppet, - group => puppet, - recurse => inf, - require => User["puppet"], - } - - file { "/etc/puppet/templates": - ensure => directory, - owner => puppet, - group => puppet, - recurse => inf, - require => User["puppet"], - } -} |