From b15043728aec00d134fda4b9069ad06bf2dcc760 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Wed, 20 Sep 2023 17:00:38 +0200 Subject: [PATCH] correct sendmail configuration the `email_` prefix is wrong, the settings have no such prefix Fixes: 6c902a4f1f484137ebccafe4d3390881fd0b3d61 --- spec/classes/foreman_spec.rb | 4 ++-- templates/settings.yaml.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/classes/foreman_spec.rb b/spec/classes/foreman_spec.rb index 74ac8b833..c927c2186 100644 --- a/spec/classes/foreman_spec.rb +++ b/spec/classes/foreman_spec.rb @@ -262,8 +262,8 @@ it 'should configure certificates in settings.yaml' do is_expected.to contain_concat__fragment('foreman_settings+01-header.yaml') - .with_content(%r{^:email_sendmail_location: "/usr/bin/mysendmail"$}) - .with_content(%r{^:email_sendmail_arguments: "--myargument"$}) + .with_content(%r{^:sendmail_location: "/usr/bin/mysendmail"$}) + .with_content(%r{^:sendmail_arguments: "--myargument"$}) .with_content(%r{^:websockets_ssl_key: /etc/ssl/private/snakeoil-ws\.pem$}) .with_content(%r{^:websockets_ssl_cert: /etc/ssl/certs/snakeoil-ws\.pem$}) end diff --git a/templates/settings.yaml.erb b/templates/settings.yaml.erb index c36f12a10..e7cfdc76e 100644 --- a/templates/settings.yaml.erb +++ b/templates/settings.yaml.erb @@ -85,10 +85,10 @@ # Email settings <% if scope.lookupvar("foreman::email_sendmail_location") -%> -:email_sendmail_location: "<%= scope.lookupvar("foreman::email_sendmail_location") %>" +:sendmail_location: "<%= scope.lookupvar("foreman::email_sendmail_location") %>" <% end -%> <% if scope.lookupvar("foreman::email_sendmail_arguments") -%> -:email_sendmail_arguments: "<%= scope.lookupvar("foreman::email_sendmail_arguments") %>" +:sendmail_arguments: "<%= scope.lookupvar("foreman::email_sendmail_arguments") %>" <% end -%> <% end -%>