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

show_diff has been deprecated #132

Open herisanu opened 7 years ago

herisanu commented 7 years ago

Let's change show_diff into show_changes: False

[WARNING ] /usr/lib/python2.7/site-packages/salt/states/file.py:1655: DeprecationWarning: The 'show_diff' argument to the file.managed state has been deprecated, please use 'show_changes' instead.

How to re-create: run formula on latest saltstack. Link to code: https://github.com/saltstack-formulas/users-formula/blob/master/users/init.sls#L180

Would you be ok with this change?

blbradley commented 7 years ago

I see show_diff in the 2016.3.3 docs. So, I don't think this is a good idea yet.

Also, backwards compatibility will need to be maintained for a long period of time.

herisanu commented 7 years ago

Yeah, backwards compatibility will be an issue. Would you consider using jinja for this? Something along the lines of:

{{ users.show_diff }}: False

Where show_diff is set in defaults.yaml or map.jinja (with a grains filter on saltversion maybe) This will give me the option of throwing this in a pillar.

blbradley commented 7 years ago

I would use a conditional that checks the salt version and uses the appropriate parameter. No pillar config required.

herisanu commented 7 years ago

Yeah, right. Or that. Is it cool to send a PR with this?

blbradley commented 7 years ago

I believe you should wait until there is a stable version of Salt that shows up in the docs with show_changes.

But don't mind me. I don't actually use this formula. Edit: yet.

noelmcloughlin commented 5 years ago

@herisanu Now is good time to do this. thx

herisanu commented 5 years ago

Heh an issue from 2016 :). Let me re-read the formula and create a PR then.

noelmcloughlin commented 5 years ago

Chuckle, our past comes back to haunt us sometimes