Ansible playbook, trying to execute ssh-copy-id to remote host for passwd less login,

Hi,

I am new for ansible. I wrote the following playbook to execute the ssh-copy-id to copy the id_rsa.pub key to remote host, but I am getting permission denied error or hanging when passing password as argument,

Playbook :

Hi,

I am new for ansible. I wrote the following playbook to execute the ssh-copy-id to copy the id_rsa.pub key to remote
host, but I am getting permission denied error or hanging when passing password as argument,

1. Make sure that Ansible is able to connect via SSH.

2. Use authorized_keys module.

Regards
        Racke