saltstack-formulas / sudoers-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
41 stars 168 forks source link

Example usage #38

Closed bfleming-ciena closed 7 years ago

bfleming-ciena commented 7 years ago

Could someone give actual example of how to add a user to the sudoers file? What are the arguments for example? Or is that supposed to be obvious from the pillar? Thanks :)

0xf10e commented 7 years ago

I guess it's obvious for those who know how the sudoers file works. But you can just use the first four lines from pillar.example to allow the user johndoe to run any command on any host (which uses this file) as any user.

bfleming-ciena commented 7 years ago

Yep, got it working. Thank you. New to salt stack, I think I was looking for a state file example, but when I used a pillar as the configuration then it worked out fine.