Browse Source

Merge pull request #46 from hipikat/master

Add 'createhome' option for 'user.present' state
tags/v0.45.0
Nitin Madhok 10 years ago
parent
commit
55d7912363
2 changed files with 4 additions and 0 deletions
  1. +1
    -0
      pillar.example
  2. +3
    -0
      users/init.sls

+ 1
- 0
pillar.example View File

fullname: B User fullname: B User
password: $6$w............. password: $6$w.............
home: /custom/buser home: /custom/buser
createhome: True
sudouser: True sudouser: True
sudo_rules: sudo_rules:
- ALL=(root) /usr/bin/find - ALL=(root) /usr/bin/find

+ 3
- 0
users/init.sls View File

{% if 'fullname' in user %} {% if 'fullname' in user %}
- fullname: {{ user['fullname'] }} - fullname: {{ user['fullname'] }}
{% endif -%} {% endif -%}
{% if not user.get('createhome', True) %}
- createhome: False
{% endif %}
- groups: - groups:
- {{ user_group }} - {{ user_group }}
{% for group in user.get('groups', []) -%} {% for group in user.get('groups', []) -%}

Loading…
Cancel
Save