Advertisement
Guest User

Untitled

a guest
Feb 27th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. {% for user, args in pillar['users'].iteritems() %}
  2. {{ user }}:
  3. user.present:
  4. - name: {{ user }}
  5. {% if 'uid' in args %}
  6. - uid: {{ args['uid'] }}
  7. {% endif %}
  8. {% if 'gid' in args %}
  9. - gid: {{ args['gid'] }}
  10. {% endif %}
  11. {% if 'fullname' in args %}
  12. - fullname: {{ args['fullname'] }}
  13. {% endif %}
  14. {% if 'roomnumber' in args %}
  15. - roomnumber: "{{ args['roomnumber'] }}"
  16. {% endif %}
  17. {% if 'workphone' in args %}
  18. - workphone: "{{ args['workphone'] }}"
  19. {% endif %}
  20. {% if 'home' in args %}
  21. - home: {{ args['home'] }}
  22. {% endif %}
  23. {% if 'shell' in args %}
  24. - shell: {{ args['shell'] }}
  25. {% endif %}
  26. {% if 'optional_groups' in args %}
  27. - optional_groups: {{ args['optional_groups'] }}
  28. {% endif %}
  29. - createhome: False
  30. - remove_groups: False
  31. - watch_in:
  32. {% endfor %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement