I'm just learning saltstack to start automating provisioning and deployment. One thing I'm having trouble finding is how to recursively set ownership on a directory after extracting an archive. When I use the user and group properties, I get a warning that says this functionality will be dropped in archive.extracted
in a future release (carbon).
This seems so trivial, but I can't find a good way to do the equivalent of chown -R user:user
on the dir that's extracted from the tar I'm unpacking.
The only thing I could find via googling was to add a cmd.run statement in the state file that runs chown
and requires the statement that unpacks the tar. There's gotta be a better way, right?
EDIT: the cmd.run
workout works perfectly btw, it just seems like a work around.