Skip to content

Commit 85710ab

Browse files
committed
Fixes #32078 - explicitly notify dynflow core service on changes
1 parent aeb026b commit 85710ab

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

manifests/plugin/dynflow.pp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@
5454
~> file { '/etc/smart_proxy_dynflow_core/settings.yml':
5555
ensure => file,
5656
content => template('foreman_proxy/plugin/dynflow_core.yml.erb'),
57+
notify => Service['smart_proxy_dynflow_core'],
5758
}
58-
~> file { '/etc/smart_proxy_dynflow_core/settings.d':
59+
-> file { '/etc/smart_proxy_dynflow_core/settings.d':
5960
ensure => link,
6061
target => "${foreman_proxy::config_dir}/settings.d",
62+
notify => Service['smart_proxy_dynflow_core'],
6163
}
62-
~> systemd::service_limits { 'smart_proxy_dynflow_core.service':
64+
-> systemd::service_limits { 'smart_proxy_dynflow_core.service':
6365
limits => {
6466
'LimitNOFILE' => $open_file_limit,
6567
},

spec/classes/foreman_proxy__plugin__dynflow_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@
5454
":ssl_private_key: /etc/puppetlabs/puppet/ssl/private_keys/foo.example.com.pem",
5555
])
5656
end
57+
58+
it 'should restart external core' do
59+
should contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.yml").
60+
that_notifies('Service[smart_proxy_dynflow_core]')
61+
should contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d").
62+
that_notifies('Service[smart_proxy_dynflow_core]')
63+
end
5764
else
5865
it { should_not contain_foreman_proxy__plugin('dynflow_core') }
5966
it { should_not contain_file("#{etc_dir}/smart_proxy_dynflow_core/settings.d") }

0 commit comments

Comments
 (0)