We have a puppet module which contains s class which creates a bunch of directories on a Linux filesystem:
class dim_dcm::dirstruct::workflow () {
file { "/opt/dirstruct/etc":
ensure => 'directory',
owner => 'use',
group => 'group',
mode => '0640',
recurse => true,
purge => true,
source => "puppet:///modules/dirstruct/etc",
}
}
And we have a directory structure in the files/
directory of our module. It works only when I create a directory with contents in $module/file/dirstruct
. When the directory is empty, Puppet doesn't create the directory on the target server. When I touch a dummy file in the empty dir, Puppet is happy to do so.
How can I create empty directories with recurse => true
? Yes, I know I could create a directory resource with that name, but the directory structures are rather involved. Besides, isn't creating directories (whether empty or not) the reason of recurse => true
?