fsperm.sls 524 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 fbkuserssettings with context %}
5
6

{% if pillar.fbkusers is defined %}
Francesco Gionghi's avatar
bugfix    
Francesco Gionghi committed
7
8
9
10
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["fsperm"] %}

{% for dir in pillar.fbkusers[user]["fsperm"] %}
11
12
13
14
15
16
17
18
19
20


{{ dir }}-{{ user }}:
  acl.present:
    - name: {{ dir }}
    - acl_type: user
    - acl_name: {{ user }}
    - perms: rwx
    - recurse: True

Francesco Gionghi's avatar
update    
Francesco Gionghi committed
21
{% endfor %}
22
23
{% endif %}
{% endfor %}
Francesco Gionghi's avatar
update    
Francesco Gionghi committed
24
{% endif %}