Skip to content

Instantly share code, notes, and snippets.

@gravyboat
Created November 4, 2013 18:19
Show Gist options
  • Save gravyboat/7306947 to your computer and use it in GitHub Desktop.
Save gravyboat/7306947 to your computer and use it in GitHub Desktop.
lookup structuring
{% 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
{% set users = salt['grains.filter_by']({
'Debian': {
'adm_group': 'sudo',
},
}, merge=salt['pillar.get']('users.lookup')) %}
users:
lookup:
adm_group: wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment