I have an NFS share on a server, that belongs to user barack
. barack
can write in this share, and root
can't, because of the root squash feature
I tried creating a directory for barack
on the share with puppet 2.7.21, using the file
type, but it looks like puppet creates files/directories as root, and then changes the ownership. Obviously, the first step will (and does) fail.
I ended up using exec
w/ mkdir
.
Is my theory about puppet creating files as root first right? Is there a way to force puppet to create a directory as barack
, using the file
type?
Disregard my below answer, I initially misunderstood.. This is apparently a bug. http://projects.puppetlabs.com/issues/14681
Yeah, use the owner parameter to the fie type
file { $your_dir_here: ensure => "directory", owner => "barack" }