module-nginx/manifests/service.pp
2014-01-07 23:16:54 -05:00

36 lines
810 B
Puppet

# Class: nginx::service
#
# This module manages NGINX service management and vhost rebuild
#
# Parameters:
#
# There are no default parameters for this class.
#
# 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
) {
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.")
}
service { 'nginx':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}
if $configtest_enable == true {
Service['nginx'] {
restart => $service_restart,
}
}
}