Skip to content

Commit

Permalink
Remove old email.yaml and cronjob cleanups
Browse files Browse the repository at this point in the history
This removes cleanup of email.yaml introduced in
e6ead45. It also removes cleanup of
crons introduced in 14fce64. Both of
them should be deployed long enough that we can assume they're gone.
  • Loading branch information
ekohl committed Apr 6, 2021
1 parent 1fe57ec commit a2fe4c9
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
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

0 comments on commit a2fe4c9

Please sign in to comment.