sshkey.sls 483 Bytes
Newer Older
Francesco Gionghi's avatar
update  
Francesco Gionghi committed
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 %}
Francesco Gionghi's avatar
update  
Francesco Gionghi committed
5
6

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

Francesco Gionghi's avatar
update  
Francesco Gionghi committed
10
sshkey-{{ user }}-{{ key }}:
11
  ssh_auth.mange:
Francesco Gionghi's avatar
update  
Francesco Gionghi committed
12
    - user: {{ user }}
13
14
15
    - ssh-key: 
{% for key in pillar.fbkusers[user]["sshkey"] %}
      - {{ key }}
Francesco Gionghi's avatar
update  
Francesco Gionghi committed
16
{% endfor %}
17

Francesco Gionghi's avatar
update  
Francesco Gionghi committed
18
19
20
21
{% endif %}
{% endfor %}
{% endif %}