Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In state "samba.user" "samba_smbpasswd_{{ login }}" gets executed each state.apply #68

Open
xenadmin opened this issue Aug 26, 2019 · 3 comments

Comments

@xenadmin
Copy link
Contributor

xenadmin commented Aug 26, 2019

This state uses a cmd.run which gets applied each time I do a state.apply. Is there a way to workaround this? This is a bit sad, because this will always result in a Changed=1

Summary for some host
-------------
Succeeded: 51 (changed=1)
Failed:     0
-------------
Total states run:     51
Total run time:    3.828 s

Could this be an alternative to cmd.run?
https://docs.saltstack.com/en/latest/ref/states/all/salt.states.pdbedit.html#salt.states.pdbedit.managed

@noelmcloughlin
Copy link
Member

Hi @xenadmin
Thanks for raising the issue. I raised this PR for quick fix: #69

There is an open issue for PBEdit here: #35 but nobody implemented this.

@xenadmin
Copy link
Contributor Author

Can you explain me what the PR does? If I understand you correctly, you fix running samba.users from beeing run, when not in use. But I explicitly rund the state as I need a user to access a share.
Maybe we should take a look at #35 maybe I can solve this. I hate it when states get aplied again and again and this seems like the obvious solution.

@noelmcloughlin
Copy link
Member

My PR only stopsusers state being run when init metastate is run. The users state handles smbpasswd user management and winbind-ad state handles active directory user management, neither should run by default. But yes, It does not fix this issue.

It would be great if you want to fix the issue using whatever solution suits (i.e. #35). Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants