Feature #7594
It should be possible to trigger specific actions with notify/subscribe relationships.
| Status: | Accepted | Start date: | 05/19/2011 | |
|---|---|---|---|---|
| Priority: | High | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | 3.x | |||
| Affected Puppet version: | Branch: | |||
| Keywords: | ||||
| Votes: | 2 |
Description
Currently if a Service or Exec receives a notify event, it refreshes.
We need more fine-grained control than this. There are common use cases where you want to specify that the service should be started or stopped instead.
Ideally we want to be able to both specify this at the sender specifically, and at the receiver as a default value, e.g. (not actual proposed syntax at all):
file { "foo.conf":
notify => Service["foo"].stop,
}
service { "foo":
notify_action => "reload",
}
Related issues
History
Updated by Robert Voje 11 months ago
Don’t forget that if the service is to be restarted, all reload actions must be cancelled, to avoid that the service is both reloaded and restarted. Maybe a kind of priority level between reload and restart.