I have a several services that I use only for some sites and I would like 
to make sure it is started when a site that uses is activated and stopped 
when it is not needed anymore.

Examples: memcache, elasticsearch, rabbitmq, etc.

I can easily make a service virtual and realize it before making a 
reference to it like this:

class webserver {
  @service {"memcache":
    ensure => running,
  }
}

class sites {
  Realize['memcache']
  site {"example.com":
    require => Service['memcache']
  }
}

But this will not stop the service if it is never realized.

Any ideas ?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/UrHwRHoRbTIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to