mkdir

Provides a useful mkdir::p define, works only on *nix, tested on Linux

Axel Bock

flypenguin

31,793 downloads

29,870 latest version

4.1 quality score

Version information

  • 1.0.4 (latest)
  • 1.0.3
  • 1.0.2
released Nov 24th 2015

Start using this module

Tags: mkdir, mkdirp

Documentation

flypenguin/mkdir — version 1.0.4 Nov 24th 2015

mkdir::p

Provides an mkdir -p implementation in pure puppet code, no functions.

Some examples:

mkdir::p { '/this/is/a/dir': }

mkdir::p { 'important dir':
  path => '/this/is/a/dir',
}

mkdir::p { '/this/is/a/dir':
  owner   => 'me',
  mode    => '0700',
}

mkdir::p { '/this/is/a/dir':
  declare_file => true,
}
# now auto-require works ...
file { '/this/is/a/dir/and_a_file':
  ensure  => 'present',
  content => 'I can be sure that this works now :)',
}