Feature #7594

It should be possible to trigger specific actions with notify/subscribe relationships.

Added by Nigel Kersten about 1 year ago. Updated 6 months ago.

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

related to Puppet - Feature #1014: Services should support 'reload' in addition to 'restart' Accepted
duplicated by Puppet - Feature #7332: resource pre / post condition on e.g. service status Duplicate 05/03/2011

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.

Also available in: Atom PDF