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

bugfix

parent d3be4d8c
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %} {%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %} {% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %} {% for user in pillar.fbkusers %}
{% if options["fsperm"] %} {% if pillar.fbkusers[user]["fsperm"] %}
{% for dir in pillar.fbkusers[user]["fsperm"] %}
{% for dir in options["fsperm"] %}
{{ dir }}-{{ user }}: {{ dir }}-{{ user }}:
acl.present: acl.present:
......
...@@ -3,12 +3,13 @@ ...@@ -3,12 +3,13 @@
{%- set fbkusersroot = slspath.split('/')[0] %} {%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %} {%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %} {% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %} {% for user in pillar.fbkusers %}
{% if options["groups"] %} {% if pillar.fbkusers[user]["group"] %}
{% for group in option["groups"] %}
{% for dir in pillar.fbkusers[user]["group"] %}
{% if salt['group.info'](group) %}
{{ group }}-{{ user }}: {{ group }}-{{ user }}:
group.present: group.present:
......
...@@ -4,10 +4,11 @@ ...@@ -4,10 +4,11 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %} {%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %} {% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %} {% for user in pillar.fbkusers %}
{% if options["sshkey"] %} {% if pillar.fbkusers[user]["sshkey"] %}
{% for dir in pillar.fbkusers[user]["sshkey"] %}
{% for key in options["sshkey"] %}
sshkey-{{ user }}-{{ key }}: sshkey-{{ user }}-{{ key }}:
ssh_auth.present: ssh_auth.present:
......
{#- Get the `tplroot` from `tpldir` #} {#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %} {%- 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 %} {% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %} {% for user in pillar.fbkusers %}
{% if options["sudocmd"] %} {% if pillar.fbkusers[user]["sudocmd"] %}
/etc/sudoers.d/{{ user }}-cmd: /etc/sudoers.d/{{ user }}-cmd:
file.managed: file.managed:
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
- template: jinja - template: jinja
- defaults: - defaults:
sudouser: {{ user }} sudouser: {{ user }}
myaccumulator: {{ options["sudocmd"] }} myaccumulator: {{ pillar.fbkusers[user]["sudocmd"] }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %} {%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %} {% if pillar.fbkusers is defined %}
{% for user, options in pillar.fbkusers %} {% for user in pillar.fbkusers %}
{% if options["sudoservice"] %} {% if pillar.fbkusers[user]["sudoservice"] %}
{% for service in options["sudoservice"] %} {% for dir in pillar.fbkusers[user]["sudoservice"] %}
/etc/sudoers.d/{{ user }}-{{ service }}-alias: /etc/sudoers.d/{{ user }}-{{ service }}-alias:
file.managed: 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