saltstack-formulas / users-formula

Configure users via pillar
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
99 stars 362 forks source link

added dir_mode logic for users.user_files #205

Closed sevrob closed 5 years ago

sevrob commented 5 years ago

Added logic for setting directory mode logic in users.user_files.

myii commented 5 years ago

@sevrob Thanks for this PR, I'm fine with it in general.

@aboe76 We need to consider something about dir_mode: it's not supported on Windows. So how about a little comment in the pillar.example to explain that (just above the line added)? Ultimately, this isn't such a big problem because all the user has to do is not add this to their pillar.

However, I checked within this formula and there is a dir_mode problem, where it is being used without the option to unset it:

https://github.com/saltstack-formulas/users-formula/blob/8d48adb3a24318810c7a214dea02224de5293bf1/users/init.sls#L225

This one will need to be resolved, to prevent issues for Windows minions. I don't have any to hand to see what error is displayed but we shouldn't do this in any case.

sevrob commented 5 years ago

new comment to pillar.example added.

aboe76 commented 5 years ago

@sevrob can you add the fix for the dir mode here?

https://github.com/saltstack-formulas/users-formula/blob/8d48adb3a24318810c7a214dea02224de5293bf1/users/init.sls#L225

after that I'm fine with merging

myii commented 5 years ago

@aboe76 I've just merged this because this PR is complete for what it does and I don't want to trouble @sevrob further for something that is unrelated to this PR's changeset. I've captured this issue under #206 instead.

Thanks for this PR, @sevrob. If you do want to help out with #206, that would be appreciated.

aboe76 commented 5 years ago

@myii good call, @sevrob thanks for you contributions!