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

28 lines
609 B
YAML

---
- 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') }}"