Commit 368ee2da authored by Francesco Gionghi's avatar Francesco Gionghi
Browse files

tomygroup and ssh_auth.manage

parent a07ba8e1
{#- Get the `tplroot` from `tpldir` #}
{%- set fbkusersroot = slspath.split('/')[0] %}
{%- from fbkusersroot ~ "/map.jinja" import fbkuserssettings with context %}
{% if pillar.fbkusers is defined %}
{% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["tomygroup"] %}
{% for userstoadd in pillar.fbkusers[user]["tomygroup"] %}
{% if salt['user.info'](userstoadd) %}
{{ userstoadd }}-to-{{ user }}:
group.present:
- name: {{ user }}
- addusers:
- {{ userstoadd }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
\ No newline at end of file
...@@ -7,15 +7,14 @@ ...@@ -7,15 +7,14 @@
{% for user in pillar.fbkusers %} {% for user in pillar.fbkusers %}
{% if pillar.fbkusers[user]["sshkey"] %} {% if pillar.fbkusers[user]["sshkey"] %}
{% for key in pillar.fbkusers[user]["sshkey"] %}
sshkey-{{ user }}-{{ key }}: sshkey-{{ user }}-{{ key }}:
ssh_auth.present: ssh_auth.mange:
- user: {{ user }} - user: {{ user }}
- name: {{ key }} - ssh-key:
{% for key in pillar.fbkusers[user]["sshkey"] %}
- {{ key }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
......
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