Closed darioblanco closed 10 years ago
You should use supervisor::service{ 'some-service': ensure => stopped
, command => '...', }`
This feature was meant exactly for this use case. Needs better docs though.
The possibly unexpected side effect of this is that a manually started service will be stopped by puppet whenever puppet runs.
The autostart variable is used in the template, service.ini.erb
.
I think your comment may actually work, we need to update the module first and see that we won't break anything.
However, the autostart
variable is never used and it confuses me a bit :S
Thanks for the fast response
autostart
is used here: https://github.com/plathrop/puppet-module-supervisor/blob/master/templates/service.ini.erb#L11
Puppet templates can access current puppet scope via @var
I am not really familiar to
ruby
andpuppet
, and I may be wrong, but one thing I am missing in this module, is being able to use theautostart
setting.I have the use case in which I need to set up some
supervisor
services, but I don't want to start them automatically. The reason is that, when we provision our instance, and supervisor is trying to start those services, there are some unmet dependencies in specific cases, giving really nasty errors that could be avoided with a manual start in a posterior moment of time, when those dependencies are met (for instance, a development instance). Briefly speaking, we would like to have asupervisord
running but with its services stopped whenever they are created.I actually saw an
autostart
variable in service.pp:L44, but it is never used. Even if we set functionality for setting it from outside, it is never going to go through. Apresent
ensure with anautostart=false
would be the ideal solution.