diff options
author | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2010-05-12 11:57:36 -0400 |
---|---|---|
committer | Jerome Charaoui <jcharaoui@cmaisonneuve.qc.ca> | 2010-05-12 11:57:36 -0400 |
commit | faf3eed61c65f59fa7f7e99bf69d1a2f6c70d629 (patch) | |
tree | 23bd360ef2f5b97d67aa49c1bb4e7c555544b119 | |
parent | 57d8ecf86f49db2c9e367480e380a73cad4b71e6 (diff) |
refactor puppet::puppetmaster::package
-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 |
3 files changed, 22 insertions, 7 deletions
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', + } + +} |