Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove old email.yaml and cronjob cleanups #931

Merged
merged 1 commit into from
Apr 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,6 @@
content => template('foreman/database.yml.erb'),
}

# email.yaml support has been removed in 1.16.
file { '/etc/foreman/email.yaml':
ensure => absent,
}

if $foreman::use_foreman_service {
if $foreman::apache {
include apache
Expand Down Expand Up @@ -110,12 +105,6 @@
}
}

# remove crons previously installed here, they've moved to the package's
# cron.d file
cron { ['clear_session_table', 'expire_old_reports', 'daily summary']:
ensure => absent,
}

if $foreman::apache {
class { 'foreman::config::apache':
passenger => $foreman::passenger,
Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
#
# $hsts_enabled:: Should HSTS enforcement in https requests be enabled
#
# $cors_domains:: List of domains that show be allowed for Cross-Origin Resource Sharing. This requires Foreman 1.22+
# $cors_domains:: List of domains that show be allowed for Cross-Origin Resource Sharing
#
# $foreman_service_puma_threads_min:: Minimum number of threads for Puma. Relevant only when Puma service is used and ignored when Passenger is used.
#
Expand Down
9 changes: 1 addition & 8 deletions spec/classes/foreman_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,7 @@
)
}

it 'should remove old crons' do
should contain_cron('clear_session_table').with_ensure('absent')
should contain_cron('expire_old_reports').with_ensure('absent')
should contain_cron('daily summary').with_ensure('absent')
end

# apache
it 'should contain foreman::config::apache' do
passenger_ruby = if facts[:osfamily] == 'RedHat' && facts[:os]['release']['major'] == '7'
'/usr/bin/tfm-ruby'
Expand Down Expand Up @@ -392,7 +387,6 @@
context 'with email configured for SMTP' do
let(:params) { super().merge(email_delivery_method: 'smtp') }

it { should contain_file('/etc/foreman/email.yaml').with_ensure('absent') }
it { should contain_foreman_config_entry('delivery_method').with_value('smtp') }
it { should contain_foreman_config_entry('smtp_authentication').with_value('') }

Expand All @@ -404,7 +398,6 @@

describe 'with email configured for sendmail' do
let(:params) { super().merge(email_delivery_method: 'sendmail') }
it { should contain_file('/etc/foreman/email.yaml').with_ensure('absent') }
it { should contain_foreman_config_entry('delivery_method').with_value('sendmail') }

describe 'with sample parameters' do
Expand Down