puppet: Generalize docker detection.

This also has the benefit of detecting zulip::dockervoyager as well as
zulip::profile::docker.
This commit is contained in:
Alex Vandiver 2020-10-20 17:52:16 -07:00 committed by Tim Abbott
parent 0f25acc7b3
commit 91cb0988e1
1 changed files with 4 additions and 6 deletions

View File

@ -35,13 +35,11 @@ class zulip::supervisor {
ensure => absent,
}
# In the dockervoyager environment, 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.
#
# This logic is definitely a hack, but it's less bad than the old hack :(
# In the docker environment, 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.
$puppet_classes = zulipconf('machine', 'puppet_classes', undef)
if $puppet_classes == 'zulip::dockervoyager' {
if 'docker' in $puppet_classes {
service { $supervisor_service:
ensure => running,
require => [