diff options
Diffstat (limited to 'manifests')
-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', + } + +} |