Commit c024106a authored by Francesco Gionghi's avatar Francesco Gionghi
Browse files

bugfix

parent d3be4d8c
......@@ -4,10 +4,11 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["fsperm"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["fsperm"] %}
{% for dir in pillar.fbkusers[user]["fsperm"] %}
{% for dir in options["fsperm"] %}
{{ dir }}-{{ user }}:
acl.present:
......
......@@ -3,12 +3,13 @@
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["groups"] %}
{% for group in option["groups"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["group"] %}
{% for dir in pillar.fbkusers[user]["group"] %}
{% if salt['group.info'](group) %}
{{ group }}-{{ user }}:
group.present:
......
......@@ -4,10 +4,11 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["sshkey"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["sshkey"] %}
{% for dir in pillar.fbkusers[user]["sshkey"] %}
{% for key in options["sshkey"] %}
sshkey-{{ user }}-{{ key }}:
ssh_auth.present:
......
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{%- from fbkusersroot ~ "/map.jinja" import fbkusers with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["sudocmd"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["sudocmd"] %}
/etc/sudoers.d/{{ user }}-cmd:
file.managed:
......@@ -14,7 +14,7 @@
- template: jinja
- defaults:
sudouser: {{ user }}
myaccumulator: {{ options["sudocmd"] }}
myaccumulator: {{ pillar.fbkusers[user]["sudocmd"] }}
{% endif %}
{% endfor %}
......
......@@ -4,10 +4,10 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %}
{% if options["sudoservice"] %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["sudoservice"] %}
{% for service in options["sudoservice"] %}
{% for dir in pillar.fbkusers[user]["sudoservice"] %}
/etc/sudoers.d/{{ user }}-{{ service }}-alias:
file.managed:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment