Browse Source

Use contents_pillar to work with multiple-line authorized_keys file

lookup-fix-3
Imran Iqbal 9 years ago
parent
commit
984317fca1
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      users/init.sls

+ 2
- 3
users/init.sls 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 %}

Loading…
Cancel
Save