I use the following lookup to read a password hash:
vars:
get_password_hash: " file=/etc/shadow delimiter={{ ‘:’ }} col=1"
tasks:
- set_fact:
password: “{{ lookup(‘csvfile’, ‘nobody’ + get_password_hash) }}”
But this throws an permission error although I run it with “become”.
Permission denied: u’/etc/shadow’
It seems to me that the lookup is not done on the remote machine, but on the local machine.
How can I run the lookup on the remote machine?