document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. # output from
  2. # salt '*' state.highstate -vvv test=true
  3. #
  4. Rendering SLS "base:users" failed: Jinja variable 'dict' object has no attribute 'gid'; line 12
  5. ---
  6. [...]
  7. group.present:
  8. - gid: {{ args['gid'] }}
  9. user.present:
  10. - fullname: {{ args['fullname'] }}
  11. - home: {{ args['home'] }}
  12. - gid: {{ args['gid'] }} <======================
  13.  
  14. {% if 'password' in args %}
  15. - password: {{ args['password'] }}
  16.  
  17. {% if 'enforce_password' in args %}
  18. [...]
  19.  
  20.  
  21. # salt/users/init.sls
  22. #
  23. {% for user, args in pillar['users'].iteritems() %}
  24. {{ user }}:
  25. group.present:
  26. - gid: {{ args['gid'] }}
  27. user.present:
  28. - fullname: {{ args['fullname'] }}
  29. - home: {{ args['home'] }}
  30. - gid: {{ args['gid'] }}
  31.  
  32. {% if 'password' in args %}
  33. - password: {{ args['password'] }}
  34.  
  35. {% if 'enforce_password' in args %}
  36. - enforce_password: {{ args['enforce_password'] }}
  37. {% endif %}
  38. {% endif %}
  39.  
  40. {% if 'groups' in args %}
  41. - groups: {{ args['groups'] }}
  42. {% endif %}
  43.  
  44. {% endfor %}
  45.  
  46. # pillar/users/init.sls
  47. #
  48. users:
  49. gracie:
  50. fullname: Luke Gracie
  51. home: /home/gracie
  52. password: <..snip..>
  53. gid: 500
  54. groups:
  55. - wheel
  56. - sr
  57. - srprop
  58. - prod
');