puppet-standalone-mashup/shared/modules/mkdir_p/manifests/init.pp
2012-08-14 21:35:41 -04:00

15 lines
257 B
Puppet

define mkdir_p($path, $owner = '') {
exec { "mkdir -p ${name}":
path => $path,
unless => "test -d ${name}"
}
if ($owner != '') {
exec { "chown ${owner} ${name}":
path => $path,
require => Exec["mkdir -p ${name}"]
}
}
}