diff options
author | mh <mh@immerda.ch> | 2010-08-06 03:59:10 +0200 |
---|---|---|
committer | mh <mh@immerda.ch> | 2010-08-06 03:59:10 +0200 |
commit | 6bd681ab05072964efc95ecfe2816e371e45a862 (patch) | |
tree | c8d43c0de77d25d3868dbbbc81cc7434cf41b455 /manifests | |
parent | d439d82c5ac07c46ae839ef5cd8abe0da70ef807 (diff) | |
parent | 79cc286c7249e39f633f422390b5ab79d72f89dd (diff) |
merge with lavamind/master
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/linux.pp | 23 | ||||
-rw-r--r-- | manifests/puppetmaster/debian.pp | 7 | ||||
-rw-r--r-- | manifests/puppetmaster/package.pp | 10 | ||||
-rw-r--r-- | manifests/puppetmaster/package/base.pp | 11 | ||||
-rw-r--r-- | manifests/puppetmaster/package/centos.pp | 8 | ||||
-rw-r--r-- | manifests/puppetmaster/passenger.pp | 46 | ||||
-rw-r--r-- | manifests/puppetmaster/storeconfigs.pp | 9 |
7 files changed, 47 insertions, 67 deletions
diff --git a/manifests/linux.pp b/manifests/linux.pp index c78570f..f9e2ea6 100644 --- a/manifests/linux.pp +++ b/manifests/linux.pp @@ -1,34 +1,27 @@ class puppet::linux inherits puppet::base { - $real_puppet_version = $puppet_version ? { - '' => 'present', - default => $puppet_version, - } - - $real_facter_version = $facter_version ? { - '' => 'present', - default => $facter_version, - } - + if $puppet_ensure_version == '' { $puppet_ensure_version = 'installed' } package{ 'puppet': - ensure => $real_puppet_version, + ensure => $puppet_ensure_version, } - + + if $facter_ensure_version == '' { $facter_ensure_version = 'installed' } package{ 'facter': - ensure => $real_facter_version, + ensure => $facter_ensure_version, } - # package bc needed for cron + # package bc needed for cron job include bc Service['puppet']{ require => Package[puppet], } + include ::cron file{'/etc/cron.d/puppetd.cron': source => [ "puppet://$server/modules/puppet/cron.d/puppetd.${operatingsystem}", "puppet://$server/modules/puppet/cron.d/puppetd" ], owner => root, group => 0, mode => 0644, - notify => service["cron"]; + notify => Service['cron']; } } diff --git a/manifests/puppetmaster/debian.pp b/manifests/puppetmaster/debian.pp index 20ac997..bcbee9b 100644 --- a/manifests/puppetmaster/debian.pp +++ b/manifests/puppetmaster/debian.pp @@ -1,11 +1,4 @@ # manifests/puppetmaster/debian.pp class puppet::puppetmaster::debian inherits puppet::puppetmaster::package { - - Package['puppet-server'] { - name => 'puppetmaster', - alias => 'puppet-server', - } - } - diff --git a/manifests/puppetmaster/package.pp b/manifests/puppetmaster/package.pp index c91dbe8..c17c6f9 100644 --- a/manifests/puppetmaster/package.pp +++ b/manifests/puppetmaster/package.pp @@ -1,14 +1,10 @@ # manifests/puppetmaster/package.pp class puppet::puppetmaster::package inherits puppet::puppetmaster::linux { + case $operatingsystem { - debian: { $puppetmaster_package="puppetmaster" } - default: { $puppetmaster_package="puppet-server" } + centos: { include puppet::puppetmaster::package::centos } + default: { include puppet::puppetmaster::package::base } } - package { $puppetmaster_package: ensure => present } - - Service[puppetmaster]{ - require +> Package[$puppetmaster_package], - } } diff --git a/manifests/puppetmaster/package/base.pp b/manifests/puppetmaster/package/base.pp new file mode 100644 index 0000000..1eb9302 --- /dev/null +++ b/manifests/puppetmaster/package/base.pp @@ -0,0 +1,11 @@ +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 new file mode 100644 index 0000000..f6470ec --- /dev/null +++ b/manifests/puppetmaster/package/centos.pp @@ -0,0 +1,8 @@ +class puppet::puppetmaster::package::centos inherits puppet::puppetmaster::package::base { + + Package['puppetmaster'] { + name => 'puppet-server', + alias => 'puppetmaster', + } + +} diff --git a/manifests/puppetmaster/passenger.pp b/manifests/puppetmaster/passenger.pp index 06e2a2b..244e2bb 100644 --- a/manifests/puppetmaster/passenger.pp +++ b/manifests/puppetmaster/passenger.pp @@ -1,45 +1,27 @@ # class to use passenger for serving puppetmaster -class puppet::puppetmaster::passenger { - - case $operatingsystem { - debian: { include puppet::puppetmaster::passenger::debian } - defaults: { notice ( "class puppet::puppetmaster::passenger::base needs to be configured for using passenger with non-debian OS !" ) - include puppet::puppetmaster::passenger::base } - } -} - -class puppet::puppetmaster::passenger::debian inherits puppet::puppetmaster::passenger::base { - # according to http://github.com/reductivelabs/puppet/tree/master/ext/rack rack needs - # to be version >= 1.0.0 . lenny-backports provide it - package { "librack-ruby": ensure => "1.0.0-2~bpo50+1" } - package { "librack-ruby1.8": ensure => "1.0.0-2~bpo50+1" } - - apache::config::global{ 'puppet-apache2-passenger.conf': } - apache::debian::module { 'ssl': ensure => present } - apache::debian::module { 'passenger': ensure => present } - apache::debian::module { 'headers': ensure => present } -} +class puppet::puppetmaster::passenger inherits puppet::puppetmaster::base { -class puppet::puppetmaster::passenger::base { - - include apache - include passenger::apache - + 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"]: + + file { ['/etc/puppet/rack', '/etc/puppet/rack/public']: ensure => directory, - mode => 0755, owner => root, - group => root, + group => 0, + mode => 0755, } + file { "/etc/puppet/rack/config.ru": ensure => present, - source => "puppet:///modules/puppet/master/config.ru", - mode => 0644, + source => [ "puppet://${server}/modules/site-puppet/master/config.ru", + "puppet://${server}/modules/puppet/master/config.ru", + ], owner => puppet, - group => root, + group => 0, + mode => 0644, } -} +} diff --git a/manifests/puppetmaster/storeconfigs.pp b/manifests/puppetmaster/storeconfigs.pp index 1b6d759..a3b09bd 100644 --- a/manifests/puppetmaster/storeconfigs.pp +++ b/manifests/puppetmaster/storeconfigs.pp @@ -1,13 +1,10 @@ # This class sets up the necessary ActiveRecord bits # so storeconfigs works. + class puppet::puppetmaster::storeconfigs { + include rails include mysql::server - - case $operatingsystem { - debian: { package { libmysql-ruby: ensure => present } } - - } - + include mysql::client::ruby } |