Created
November 4, 2013 18:19
-
-
Save gravyboat/7306947 to your computer and use it in GitHub Desktop.
lookup structuring
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
{% from "users/map.jinja" import users with context %} | |
group1: | |
mbarnett: | |
fullname: Melissa Barnett | |
groups: | |
- {{ salt['pillar.get']('users.adm_group') }} | |
crypt: $6$eR6EbjW8$abCOo.v/bx629Sl0jz0R61jIE8kC8Q3v7VhxTDjTerSiJnF.9Qv2XXw/Whb3x48yBfFGAPmiHW5PAKxNcegcg1 | |
home: /home/mbarnett |
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
{% set users = salt['grains.filter_by']({ | |
'Debian': { | |
'adm_group': 'sudo', | |
}, | |
}, merge=salt['pillar.get']('users.lookup')) %} |
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
users: | |
lookup: | |
adm_group: wheel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment