createuser.sls 468 Bytes
Newer Older
1
2
3

{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
Francesco Gionghi's avatar
Francesco Gionghi committed
4
{%- from fbkusersroot ~ "/map.jinja" import fbkusers-settings with context %}
5
6
7


{% if pillar.fbkusers is defined %}
Francesco Gionghi's avatar
Francesco Gionghi committed
8
{% for user in fbkusers %}
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

{{ user }}-group:
  group.present:
    - name: {{ user }}
{{ user }}-user:
  user.present:
    - name: {{ user }}
    - shell: /bin/bash
    - gid: {{ user }}


{% endfor %}
{% else %}
fbkusers-pillar-not-defined:
  test.nop
{% endif %}