Only manage service if manage_service is set

For magnum::api, the service is not managed by puppet when
manage_service is false. This should be the correct/intuitive behaviour.

Set magnum::conductor to be the same.

Change-Id: I190035142db4743128b73246a5886e12e8b4808f
This commit is contained in:
Jake Yip 2021-06-23 15:53:26 +10:00 committed by Takashi Kajinami
parent 2b4b7560f5
commit 3a9c564885
2 changed files with 9 additions and 9 deletions

View File

@ -55,15 +55,15 @@ class magnum::conductor(
} else {
$service_ensure = 'stopped'
}
}
# Manage service
service { 'magnum-conductor':
ensure => $service_ensure,
name => $::magnum::params::conductor_package,
enable => $enabled,
hasstatus => true,
tag => ['magnum-service', 'magnum-db-sync-service'],
# Manage service
service { 'magnum-conductor':
ensure => $service_ensure,
name => $::magnum::params::conductor_package,
enable => $enabled,
hasstatus => true,
tag => ['magnum-service', 'magnum-db-sync-service'],
}
}
magnum_config {

View File

@ -43,7 +43,7 @@ describe 'magnum::conductor' do
:manage_service => false
}
end
it { is_expected.to contain_service('magnum-conductor').without_ensure }
it { is_expected.not_to contain_service('magnum-conductor') }
end
context 'with workers specified' do