fix warning about templating
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
ansible.posix.authorized_key:
|
||||
user: "{{ item }}"
|
||||
state: present
|
||||
key: "{{ lookup('file', '/home/{{ item }}/.ssh/id_rsa.pub')}}"
|
||||
key: "{{ lookup('file', '/home/' + item + '/.ssh/id_rsa.pub')}}"
|
||||
when:
|
||||
- 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 }}"
|
||||
|
||||
Reference in New Issue
Block a user