From 766293ebc990be55533a70f1dad508b3548b45b4 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sat, 25 Aug 2018 15:00:20 +0200 Subject: [PATCH] lookup with playbook_dir --- tasks/ssh.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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