authkey.yml
351 Bytes
# append local public key to remote user's authorized_keys
# to make ssh login without key
---
- hosts: search-service
remote_user: root
tasks:
- name: deliver authorized_keys
authorized_key:
user: root
key: "{{ lookup('file', '/home/ansible/yoho-ansible-roles/search.pub') }}"
state: present
exclusive: no