Install the package and start the service
This commit is contained in:
parent
57b2f4b01a
commit
45bc83642d
16
manifests/init.pp
Normal file
16
manifests/init.pp
Normal 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
13
manifests/params.pp
Normal 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}")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user