module-nginx/manifests/service.pp

37 lines
810 B
ObjectPascal
Raw Normal View History

2011-06-07 01:05:27 +02:00
# Class: nginx::service
#
# This module manages NGINX service management and vhost rebuild
#
# Parameters:
#
# There are no default parameters for this class.
2011-06-07 01:05:27 +02:00
#
# Actions:
#
# Requires:
#
# Sample Usage:
#
# This class file is not called directly
class nginx::service(
$configtest_enable = $nginx::params::nx_configtest_enable,
$service_restart = $nginx::params::nx_service_restart
) {
2014-01-06 22:27:57 +01:00
if $caller_module_name != $module_name {
warning("${name} is deprecated as a public API of the ${module_name} module and should no longer be directly included in the manifest.")
}
2013-05-08 14:15:42 +02:00
service { 'nginx':
2011-05-25 04:20:48 +02:00
ensure => running,
enable => true,
2011-05-25 04:20:48 +02:00
hasstatus => true,
hasrestart => true,
2011-05-25 04:20:48 +02:00
}
if $configtest_enable == true {
2013-05-08 14:15:42 +02:00
Service['nginx'] {
restart => $service_restart,
}
}
}