From 1ee08fc5a47fc3bfee7dd11a389d51667c02fcb6 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 3 Apr 2022 23:45:38 +0900 Subject: [PATCH] api: Clear ssl parameters when use_ssl is false ... instead of leaving these parameters unmanaged. Change-Id: Id3f5f74aa670bd78388f4af47b14132f1bab7369 --- manifests/api.pp | 6 ++++++ spec/classes/cinder_api_spec.rb | 3 +++ 2 files changed, 9 insertions(+) diff --git a/manifests/api.pp b/manifests/api.pp index 01791d2b..8904a733 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -245,6 +245,12 @@ running as a standalone service, or httpd for being run by a httpd server") 'ssl/key_file' : value => $key_file; 'ssl/ca_file' : value => $ca_file; } + } else { + cinder_config { + 'ssl/cert_file' : value => $::os_service_default; + 'ssl/key_file' : value => $::os_service_default; + 'ssl/ca_file' : value => $::os_service_default; + } } if (!is_service_default($ratelimits)) { diff --git a/spec/classes/cinder_api_spec.rb b/spec/classes/cinder_api_spec.rb index 71431545..b21dfa12 100644 --- a/spec/classes/cinder_api_spec.rb +++ b/spec/classes/cinder_api_spec.rb @@ -38,6 +38,9 @@ describe 'cinder::api' do :enable_proxy_headers_parsing => '', :max_request_body_size => '', ) + is_expected.to contain_cinder_config('ssl/ca_file').with_value('') + is_expected.to contain_cinder_config('ssl/cert_file').with_value('') + is_expected.to contain_cinder_config('ssl/key_file').with_value('') end end