2012-08-15 01:35:41 +00:00
|
|
|
define mkdir_p($path, $owner = '') {
|
2012-01-18 17:29:05 +00:00
|
|
|
exec { "mkdir -p ${name}":
|
|
|
|
path => $path,
|
|
|
|
unless => "test -d ${name}"
|
|
|
|
}
|
2012-08-15 01:35:41 +00:00
|
|
|
|
|
|
|
if ($owner != '') {
|
|
|
|
exec { "chown ${owner} ${name}":
|
|
|
|
path => $path,
|
|
|
|
require => Exec["mkdir -p ${name}"]
|
|
|
|
}
|
|
|
|
}
|
2012-01-18 17:29:05 +00:00
|
|
|
}
|
|
|
|
|