Added $ignoreNginxService for nginx service

This commit is contained in:
Alexander Trost
2017-11-02 07:53:09 +01:00
parent deae867a1b
commit 52e2d3317d
2 changed files with 27 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ class zulip::dockervoyager {
safepackage { $appdb_packages: ensure => "installed" }
$ignoreSupervisorService = true
$ignoreNginxService = true
include zulip::supervisor

View File

@@ -41,4 +41,30 @@ class zulip::nginx {
group => "adm",
mode => 650
}
# Depending on the environment, ignoreNginxService is set, meaning we
# don't want/need supervisor to be started/stopped
# /bin/true is used as a decoy command, to maintain compatibility with other
# code using the supervisor service.
if $ignoreNginxService != undef and $ignoreNginxService {
service { "nginx":
ensure => running,
require => [
File["/var/log/nginx"],
Package["nginx-full"],
],
hasstatus => true,
status => "/bin/true",
hasrestart => true,
restart => "/bin/true"
}
} else {
service { "supervisor":
ensure => running,
require => [
File["/var/log/nginx"],
Package["nginx-full"],
],
}
}
}