adrienthebo/puppet-steam — pull request #3 by neoice (2013-07-04 19:44:03+00:00)
Title: add 'creates' so extraction only occurs once

without this `creates`, the untar occurs every time puppet runs. this is 1) irritating and 2) will overwrite permissions set on `steamcmd.sh`, `steam.sh` and `linux32/`. these files actually come out of the tar as uid:gid 1000:1000. if the steam user is not 1000, it will not have execute permissions on these shell scripts. interestingly, `steamcmd.sh` fails to run when called via `bash steamcmd.sh`, so execute permissions are required.

this could be solved in two ways. the less verbose but arguably less correct is to add `recurse => true` to the `file { $steamcmd_root }`. I'm actually a big fan of this because it then enforces steam:steam ownership of ALL steam files. however, if you want to follow absolute best practices, you should not apply 755 to non-executable files (like all the game data files). puppet doesn't have the equivalent of `chmod +X`.

alternatively, you could create a file for the contents of the tarball, like `$steamcmd_root/steam.sh`, etc and manually set permissions. this is much more code and will require manual updates if the contents of the tarball change.

personally, I implemented the first way. I can add it to this pull request if you'd like. since this is a puppet module to manage **video game servers**, I don't know if our time is well spent building the most absolutely correct solution.