hpc-cluster/ansible-ctdo/roles/authkeys/tasks/main.yml

28 lines
609 B
YAML
Raw Normal View History

2020-01-12 12:08:05 +00:00
---
- name: add authorized keys for user root (for {{group}})
tags:
- authkeys
authorized_key:
user: root
state: present
key: "{{ sshkeys[group]|map(attribute='publish_ssh_key')|join('\n') }}"
- name: add authorized keys for user debian
tags:
- authkeys
authorized_key:
user: debian
state: present
key: "{{ sshkeys[group]|map(attribute='publish_ssh_key')|join('\n') }}"
#- name: remove authorized keys for user root
# tags:
# - authkeys
# authorized_key:
# user: root
# state: absent
# key: "{{removed|map(attribute='publish_ssh_key')|join('\n') }}"