0
0
mirror of https://github.com/saltstack-formulas/users-formula.git synced 2024-11-30 19:35:33 +01:00

Use contents_pillar to work with multiple-line authorized_keys file

This commit is contained in:
Imran Iqbal 2015-12-30 03:27:51 +00:00
parent 21fc8df0b6
commit 984317fca1

View 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 %}