Sfoglia il codice sorgente

Use contents_pillar to work with multiple-line authorized_keys file

tags/v0.45.0
Imran Iqbal 9 anni fa
parent
commit
984317fca1
1 ha cambiato i file con 2 aggiunte e 3 eliminazioni
  1. +2
    -3
      users/init.sls

+ 2
- 3
users/init.sls Vedi File

@@ -207,9 +207,8 @@ users_authorized_keys_{{ name }}:
{{ auth }}
{% endfor -%}
{% else %}
- contents: |
{%- for key_name, pillar_name in user['ssh_auth_pillar'].iteritems() %}
{{ salt['pillar.get'](pillar_name + ':' + key_name + ':pubkey', '') }}
{%- for key_name, pillar_name in user['ssh_auth_pillar'].items() %}
- contents_pillar: {{ pillar_name }}:{{ key_name }}:pubkey
{%- endfor %}
{% endif %}
{% endif %}

Loading…
Annulla
Salva