Browse Source

Added ability to specify room number, home phone, and work phone as per https://docs.saltstack.com/en/develop/ref/states/all/salt.states.user.html

tags/v0.45.0
maschinetheist 9 years ago
parent
commit
f087f165f3
2 changed files with 12 additions and 0 deletions
  1. +3
    -0
      pillar.example
  2. +9
    -0
      users/init.sls

+ 3
- 0
pillar.example View File

enforce_password: True enforce_password: True
home: /custom/buser home: /custom/buser
createhome: True createhome: True
roomnumber: "A-1"
workphone: "(555) 555-5555"
homephone: "(555) 555-5551"
manage_vimrc: False manage_vimrc: False
manage_bashrc: False manage_bashrc: False
manage_profile: False manage_profile: False

+ 9
- 0
users/init.sls View File

{% if 'fullname' in user %} {% if 'fullname' in user %}
- fullname: {{ user['fullname'] }} - fullname: {{ user['fullname'] }}
{% endif -%} {% endif -%}
{% if 'roomnumber' in user %}
- roomnumber: {{ user['roomnumber'] }}
{% endif %}
{% if 'workphone' in user %}
- workphone: {{ user['workphone'] }}
{% endif %}
{% if 'homephone' in user %}
- homephone: {{ user['workphone'] }}
{% endif %}
{% if not user.get('createhome', True) %} {% if not user.get('createhome', True) %}
- createhome: False - createhome: False
{% endif %} {% endif %}

Loading…
Cancel
Save