Thank you. That's the solution.
But... I would like to ask if your example really did work for you?
I managed to do what I wanted, but in addition I also had to pass a variable to hosts in playbook:
ansible-playbook -i 192.168.0.1, playbook.yml --extra-vars "newpi=192.168.0.1 ansible_ssh_pass=raspberry"
and use:
in the playbook.yml
Is there a way that makes passing the newpi unnecessary?