Browse Source

Add support for setting user expire

tags/v0.45.0
Thomas Juberg 10 years ago
parent
commit
e35045801c
2 changed files with 5 additions and 1 deletions
  1. +2
    -1
      pillar.example
  2. +3
    -0
      users/init.sls

+ 2
- 1
pillar.example View File

password: $6$w............. password: $6$w.............
home: /custom/buser home: /custom/buser
createhome: True createhome: True
expire: 16426
sudouser: True sudouser: True
sudo_rules:
sudo_rules:
- ALL=(root) /usr/bin/find - ALL=(root) /usr/bin/find
- ALL=(otheruser) /usr/bin/script.sh - ALL=(otheruser) /usr/bin/script.sh
shell: /bin/bash shell: /bin/bash

+ 3
- 0
users/init.sls View File

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

Loading…
Cancel
Save