Merge "Do not define service resource when service management is disabled"

This commit is contained in:
Zuul 2022-02-15 10:47:23 +00:00 committed by Gerrit Code Review
commit abc8b1ff74

View File

@ -31,15 +31,12 @@ class zaqar::server(
include zaqar::params
include zaqar::policy
if $manage_service {
if $enabled {
if $manage_service {
$ensure = 'running'
}
} else {
if $manage_service {
$ensure = 'stopped'
}
}
if $service_name == $::zaqar::params::service_name {
service { $::zaqar::params::service_name:
@ -65,5 +62,5 @@ class zaqar::server(
fail("Invalid service_name. Either zaqar-server/openstack-zaqar for \
running as a standalone service, or httpd for being run by a httpd server")
}
}
}