diff --git a/tasks/ssh.yml b/tasks/ssh.yml index 520b5ea..8d32fa3 100644 --- a/tasks/ssh.yml +++ b/tasks/ssh.yml @@ -18,14 +18,10 @@ line: "PermitRootLogin no" backrefs: yes -- name: Debug deploy_public_key - debug: - msg: "{{ playbook_dir }} " - - name: Add public key for deploy user authorized_key: user: "{{ item.username }}" - key: "{{ deploy_public_key }}" + key: "{{ lookup('file', playbook_dir + '/' + deploy_public_key) }}" state: present with_items: "{{ deploy_users }}" register: add_identity_key