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:

Feature #6643

Make ensure mandatory.

Added by Nigel Kersten about 5 years ago. Updated over 4 years ago.

Status:AcceptedStart date:03/08/2011
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.x
Affected Puppet version: Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:



Take the following two cases:

file { "/tmp/foo": }
file { "/tmp/foo":
  content => foo",

The first case doesn’t create the file, the second does, even though the ensure state hasn’t been specified in either.

We’ve pushed this complexity down into the providers themselves, where they need to handle all the various permutations of non-ensure properties, and decide whether or not to set ensure.

I believe this is error-prone, and will end up varying significantly across types and providers, resulting in confused users.

I’m proposing that we make ensure mandatory, and if you set any properties other than “audit” on a resource when you haven’t specified ensure, we either:

  • error at a higher level
  • provide a standard way of marking properties as providing an implicit ensure value
    • error if a property not marked in this manner is used.


#1 Updated by Ben Hughes about 5 years ago

  • Status changed from Unreviewed to Accepted

#2 Updated by Devon Peters over 4 years ago

  • Category set to provider

Also available in: Atom PDF