Created
April 25, 2017 20:05
-
-
Save anonymous/2ae3dc427ec16830f47bbb9f6493fb1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{%- for user, commands in pillar.get('nopass_sections', {} ).items() %} | |
{%- for command in commands %} | |
{{ user }} ALL=(ALL) NOPASSWD: {{ command }} | |
{%- endfor %} | |
{%- endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to use
{{commands|join(', ')}}
instead of the for loop for commands.
iirc sudo allows for multiple commands there.