# output from
# salt '*' state.highstate -vvv test=true
#
Rendering SLS "base:users" failed: Jinja variable 'dict' object has no attribute 'gid'; line 12
---
[...]
group.present:
- gid: {{ args['gid'] }}
user.present:
- fullname: {{ args['fullname'] }}
- home: {{ args['home'] }}
- gid: {{ args['gid'] }} <======================
{% if 'password' in args %}
- password: {{ args['password'] }}
{% if 'enforce_password' in args %}
[...]
# salt/users/init.sls
#
{% for user, args in pillar['users'].iteritems() %}
{{ user }}:
group.present:
- gid: {{ args['gid'] }}
user.present:
- fullname: {{ args['fullname'] }}
- home: {{ args['home'] }}
- gid: {{ args['gid'] }}
{% if 'password' in args %}
- password: {{ args['password'] }}
{% if 'enforce_password' in args %}
- enforce_password: {{ args['enforce_password'] }}
{% endif %}
{% endif %}
{% if 'groups' in args %}
- groups: {{ args['groups'] }}
{% endif %}
{% endfor %}
# pillar/users/init.sls
#
users:
gracie:
fullname: Luke Gracie
home: /home/gracie
password: <..snip..>
gid: 500
groups:
- wheel
- sr
- srprop
- prod