Refresh nailgun systemd units if settings.yaml is updated

This was caused by starting systemd services before applying
Puppet, which prevented Puppet changes to settings from taking
effect immediately.

Change-Id: I9f644b829601b68182b397989e43bf4f80773975
Closes-Bug: #1526874
This commit is contained in:
Matthew Mosesohn 2015-12-24 10:57:22 +00:00
parent 5c1b87188a
commit 3cc8d3e9c0
2 changed files with 5 additions and 0 deletions

View File

@ -183,6 +183,10 @@ if $use_systemd {
services => $services,
require => Class['nailgun::venv']
}
if ($production == 'prod') or ($production == 'docker') {
File['/etc/nailgun/settings.yaml'] ~> Service[$services]
}
} else {
class { 'nailgun::supervisor':
service_enabled => false,

View File

@ -92,6 +92,7 @@ describe manifest do
:ensure => 'running',
:enable => 'true',
})
should contain_file('/etc/nailgun/settings.yaml').that_notifies("Service[#{service}]")
end
end
end # context