ansible/deploy_ssh_key.yml

11 lines
276 B
YAML

---
- hosts: ubuntu,debian,raspberry
tasks:
- name: Deploy Ansible SSH-Key
authorized_key:
user: root
key: "{{ lookup('file', '/root/.ssh/id_rsa.pub') }}"
path: /root/.ssh/authorized_keys
state: present