Skip to content

Instantly share code, notes, and snippets.

Created March 28, 2017 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c480b5edd59afacff8be968534f92768 to your computer and use it in GitHub Desktop.
Save anonymous/c480b5edd59afacff8be968534f92768 to your computer and use it in GitHub Desktop.
build group list for user
local:
Data failed to compile:
----------
Rendering SLS 'base:pscweb-test.vhost_users' failed: Jinja syntax error: expected token ':', got '}'; line 9
#site_users.sls
{%for user,args in pillar['site_users'].iteritems() %}
{{ user }}:
user.present:
- home: {{ args['home'] }}
- shell: /bin/false
- gid_from_name: True
{% set group_list = {{ group_list }} + [ '{{ user }}' ] %}
{% endfor %}
cmstransport:
user.present:
- groups:
- cis-webdev
{{ group_list }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment