Restart only api service when api-paste.ini is updated

... because the file is used by only the api service.

Change-Id: Id61d3316fbd1f2ff8343edfb8800ec5fa2ac097b
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-09-06 23:38:35 +09:00
parent 7c167c4805
commit d4844a3ac7
2 changed files with 5 additions and 1 deletions

View File

@@ -91,6 +91,8 @@ class cloudkitty::api (
hasrestart => true,
tag => 'cloudkitty-service',
}
Cloudkitty_api_paste_ini<||> ~> Service['cloudkitty-api']
} elsif $service_name == 'httpd' {
service { 'cloudkitty-api':
ensure => 'stopped',
@@ -102,6 +104,8 @@ class cloudkitty::api (
# we need to make sure cloudkitty-api/eventlet is stopped before trying to start apache
Service['cloudkitty-api'] -> Service[$service_name]
Cloudkitty_api_paste_ini<||> ~> Service[$service_name]
} else {
fail('Invalid service_name. Only httpd for being run by a httpd server')
}

View File

@@ -29,7 +29,7 @@ class cloudkitty::deps {
# paste-api.ini config should occur in the config block also.
Anchor['cloudkitty::config::begin']
-> Cloudkitty_api_paste_ini<||>
~> Anchor['cloudkitty::config::end']
-> Anchor['cloudkitty::config::end']
# all coordination settings should be applied and all packages should be
# installed before service startup