lookup with playbook_dir

This commit is contained in:
Bertrand Benjamin 2018-08-25 15:00:20 +02:00
parent 9b9bf4afc0
commit 766293ebc9

View File

@ -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