I am almost sure that I have seen this question here again, but I can’t find
it. If that’s the case, then I’m sorry for duplicating this issue.
Well, what I want to do is quite simple: Create a directory structure on a node
based on a directory in the cookbook I use with the same file permissions.
I tried using remote_directory resource, but empty directories where not
created and also the file permissions where not as the original.
I also thought about creating a tar archive and untarring it on the node (after
copying it), but I want the resource to be idempotent.
Any other resource or cookbook that does anything like this?
I tried using remote_directory resource, but empty directories where not
created and also the file permissions where not as the original.
I also thought about creating a tar archive and untarring it on the node (after
copying it), but I want the resource to be idempotent.
You could use a tarball to provide the source filesystem meta-data, and then use rsync locally on the filesystem to ensure that the target directory structure has the same ownership/permissions as the tarball.
Kind of a screwy way to have to do that, but at least you would have rsync going for you to provide idempotency.