Install the package and start the service

This commit is contained in:
Nate Riffe 2012-09-03 10:32:48 -05:00
parent 57b2f4b01a
commit 45bc83642d
2 changed files with 29 additions and 0 deletions

16
manifests/init.pp Normal file
View File

@ -0,0 +1,16 @@
class bind (
) {
include bind::params
package { $bind::params::bind_package:
ensure => latest,
}
service { $bind::params::bind_service:
ensure => running,
enable => true,
hasreload => true,
hasrestart => true,
hasstatus => true,
}
}

13
manifests/params.pp Normal file
View File

@ -0,0 +1,13 @@
class bind::params {
case $::osfamily {
'Debian': {
$bind_package = 'bind9'
$bind_service = 'bind9'
}
default: {
fail("Operating system is not supported ${::osfamily}")
}
}
}