I found my problem. As I was running ansible with sudo (-s) parameter, my ssh-agent socket was forwarded for the regular user only. Then I need to add "sudo: yes" to all the tasks I need sudo and be sure the task where I run ssh to remote tasks has no sudo.
This link helped me to find the problem: https://github.com/ansible/ansible/issues/7235 Thanks -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/067ec060-971d-4cd7-a641-ebf212056838%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.