Do not define service resource when service management is disabled

Change-Id: Iabaeb38771beafaff995cebfa29ad128ed0a71e0
This commit is contained in:
Takashi Kajinami 2022-02-10 13:56:44 +09:00
parent 3505adfb00
commit 519643dde9

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")
}
}
}