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:

Bug #668

Using File with ensure => directory fails if there's no parent directory

Added by Miguel Lourenco almost 9 years ago. Updated almost 9 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Luke Kanies% Done:


Target version:-
Affected Puppet version:0.25.4 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


This fails if the directory /var/local/sandbox does not exist:

file { “/var/local/sandbox/test”: ensure => directory }

I don’t know if it’s by choice (I would personally prefer that it would create the directory) or if it’s a bug, so I’m opening a ticket on it since it’s not documented.

Using mkdir -p would probably work, although I’m not sure about the permissions of the directories created in the path to the new one…


#1 Updated by Luke Kanies almost 9 years ago

  • Status changed from 1 to Closed
  • 7 set to duplicate

This is a duplicate of #86.

Also available in: Atom PDF