fix warning about templating
This commit is contained in:
@@ -14,8 +14,8 @@
|
|||||||
ansible.posix.authorized_key:
|
ansible.posix.authorized_key:
|
||||||
user: "{{ item }}"
|
user: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
key: "{{ lookup('file', '/home/{{ item }}/.ssh/id_rsa.pub')}}"
|
key: "{{ lookup('file', '/home/' + item + '/.ssh/id_rsa.pub')}}"
|
||||||
when:
|
when:
|
||||||
- users is defined
|
- users is defined
|
||||||
- lookup('first_found', '/home/{{ item }}/.ssh/id_rsa.pub', errors='ignore')
|
- lookup('first_found', '/home/' + item + '/.ssh/id_rsa.pub', errors='ignore')
|
||||||
loop: "{{ users }}"
|
loop: "{{ users }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user