createuser.sls 541 Bytes
Newer Older
1
2
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
Francesco Gionghi's avatar
Francesco Gionghi committed
3
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
4
5
6


{% if pillar.fbkusers is defined %}
Francesco Gionghi's avatar
Francesco Gionghi committed
7
{% for user in pillar.fbkusers %}
8
9
10
11
12
13
14
15
16

{{ user }}-group:
  group.present:
    - name: {{ user }}
{{ user }}-user:
  user.present:
    - name: {{ user }}
    - shell: /bin/bash
    - gid: {{ user }}
Francesco Gionghi's avatar
Francesco Gionghi committed
17
    - password: {{ user.password | default("e2898f5daf2faff61a09162762ceecb201fed999202e00329510cf795406cb48", true)}}
18

Francesco Gionghi's avatar
Francesco Gionghi committed
19
{% endfor %}
Francesco Gionghi's avatar
Francesco Gionghi committed
20
{% endif %}