# add auth key from local file to remote user
---
- 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