fuel-library/deployment/puppet/nailgun/manifests/nginx-service.pp
Matthew Mosesohn 4d942716e3 Allow nginx to deploy separate from nailgun
Added new nginx.pp which owns the entire
nginx service, indepdent from main init.pp
for nailgun. Service start is optional to
compensate for LXC envs.

Added new fields for nailgun and ostf hosts
in case they are on a separate server or
container.

blueprint fuel-containerization-of-services

Change-Id: I79f10b7abc97eeb94574718e1dcf14cf5771c8cd
2014-04-04 14:52:37 +00:00

20 lines
457 B
Puppet

class nailgun::nginx-service (
$service_enabled = true,
) {
if ( $service_enabled == false ){
$ensure = false
} else {
$ensure = 'running'
}
service { 'nginx':
enable => $service_enabled,
ensure => $ensure,
require => Package["nginx"],
}
Package<| title == 'nginx'|> ~> Service<| title == 'nginx'|>
if !defined(Service['nginx']) {
notify{ "Module ${module_name} cannot notify service nginx package update": }
}
}