- PUBLICKEY | - PUBLICKEY | ||||
ssh_auth.absent: | ssh_auth.absent: | ||||
- PUBLICKEY_TO_BE_REMOVED | - PUBLICKEY_TO_BE_REMOVED | ||||
# Generates an authorized_keys file for the user | |||||
# with the given keys | |||||
ssh_auth_file: | |||||
- PUBLICKEY | |||||
google_auth: | google_auth: | ||||
ssh: | | ssh: | | ||||
SOMEGAUTHHASHVAL | SOMEGAUTHHASHVAL |
{% endfor %} | {% endfor %} | ||||
{% endif %} | {% endif %} | ||||
{% if 'ssh_auth_file' in user %} | |||||
{{ home }}/.ssh/authorized_keys: | |||||
file.managed: | |||||
- user: {{ name }} | |||||
- group: {{ name }} | |||||
- mode: 600 | |||||
- contents: | | |||||
{% for auth in user.ssh_auth_file -%} | |||||
{{ auth }} | |||||
{% endfor -%} | |||||
{% endif %} | |||||
{% if 'sudouser' in user and user['sudouser'] %} | {% if 'sudouser' in user and user['sudouser'] %} | ||||
sudoer-{{ name }}: | sudoer-{{ name }}: |