It's unclear as to whether you're trying to create a directory, or recursively mirror the contents of a directory.
If you just want to create a directory:
file { '/etc/httpd/conf.d':
ensure => directory,
}
If you need to recursively mirror the contents of a directory:
file { '/etc/httpd/conf.d':
source => 'puppet://server/vol/mnt1/adm/httpd/conf.d',
recurse => true,
}
For example:
/tmp/foo.pp
file { '/tmp/mydir':
source => 'puppet:///modules/profile/mydir',
recurse => true,
}
Then:
[root@centos-72-x64 ~]# mkdir -p /etc/puppetlabs/code/environments/production/modules/profile/files/mydir
[root@centos-72-x64 ~]# for i in a b c d ; do touch /etc/puppetlabs/code/environments/production/modules/profile/files/mydir/$i ; done
[root@centos-72-x64 ~]# puppet apply /tmp/foo.pp
Notice: Compiled catalog for centos-72-x64.macquarie.local in environment production in 0.04 seconds
Notice: /Stage[main]/Main/File[/tmp/mydir]/ensure: created
Notice: /Stage[main]/Main/File[/tmp/mydir/a]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
Notice: /Stage[main]/Main/File[/tmp/mydir/b]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
Notice: /Stage[main]/Main/File[/tmp/mydir/c]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
Notice: /Stage[main]/Main/File[/tmp/mydir/d]/ensure: defined content as '{md5}d41d8cd98f00b204e9800998ecf8427e'
Notice: Applied catalog in 0.21 seconds