The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Refactor #1537

"ensure" and "enable" running order for a service is inappropriate

Added by Oliver Hookins over 7 years ago. Updated over 5 years ago.

Status:AcceptedStart date:08/29/2008
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:0.24.8 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


Granted, I only have a single use case for this but it is valid. Say we have several service levels of machine, and on the lowest level we don’t want to run puppet aside from during the build where we set up some defaults.

So we have something like this defined in the manifests:

class puppet::disable {

    # Disable puppet
    service { "puppet":
            ensure => stopped,
            enable => false,


Hovever, the “ensure” part is run first, which stops puppet in the middle of the run. Since the “enable” part would usually be run afterwards, it is never run. Therefore quite possibly puppet will stay chkconfig'ed on.

To fix this we just need the running order reversed. I can’t think of any reason why this would break things.


#1 Updated by James Turnbull about 7 years ago

  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Luke Kanies

#2 Updated by Luke Kanies about 7 years ago

  • Status changed from Needs Decision to Accepted
  • Assignee changed from Luke Kanies to Puppet Community

I guess I’m ok with this but it involves hacking the ensure property so that it checks if ‘enable’ is out of sync, and if so, runs it first. Puppet’s model requires that ensure always runs first, so anything that needs to run before it must be done explicitly by the ‘ensure’ property.

See the hackery in the file type around content and source for an example.

#3 Updated by James Turnbull over 6 years ago

  • Assignee deleted (Puppet Community)
  • Affected Puppet version set to 0.24.8

Also available in: Atom PDF