lookup with playbook_dir
This commit is contained in:
parent
9b9bf4afc0
commit
766293ebc9
@ -18,14 +18,10 @@
|
|||||||
line: "PermitRootLogin no"
|
line: "PermitRootLogin no"
|
||||||
backrefs: yes
|
backrefs: yes
|
||||||
|
|
||||||
- name: Debug deploy_public_key
|
|
||||||
debug:
|
|
||||||
msg: "{{ playbook_dir }} "
|
|
||||||
|
|
||||||
- name: Add public key for deploy user
|
- name: Add public key for deploy user
|
||||||
authorized_key:
|
authorized_key:
|
||||||
user: "{{ item.username }}"
|
user: "{{ item.username }}"
|
||||||
key: "{{ deploy_public_key }}"
|
key: "{{ lookup('file', playbook_dir + '/' + deploy_public_key) }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ deploy_users }}"
|
with_items: "{{ deploy_users }}"
|
||||||
register: add_identity_key
|
register: add_identity_key
|
||||||
|
Loading…
Reference in New Issue
Block a user