Skip to content

Commit 10bcb5c

Browse files
evgeniehelms
authored andcommitted
Fixes #34602 - restart services after plugin installation
1 parent 1c52729 commit 10bcb5c

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

manifests/init.pp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,10 @@
343343

344344
contain 'foreman::settings' # lint:ignore:relative_classname_inclusion (PUP-1597)
345345
Class['foreman::database'] -> Class['foreman::settings']
346+
347+
file { '/usr/share/foreman/tmp/restart_required_changed_plugins':
348+
ensure => absent,
349+
notify => Class['foreman::service'],
350+
require => Class['foreman::install'],
351+
}
346352
}

spec/classes/foreman_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@
157157

158158
# settings
159159
it { should contain_class('foreman::settings').that_requires('Class[foreman::database]') }
160+
161+
# restart service when new plugins are installed
162+
it { should contain_file('/usr/share/foreman/tmp/restart_required_changed_plugins').that_requires('Class[foreman::install]').that_notifies('Class[foreman::service]') }
160163
end
161164

162165
context 'without apache' do

0 commit comments

Comments
 (0)