issue using remote_user

Hi all, I ran the ansible-playbook using the file below and got the following errors. 
FILE: file.yml
---
- hosts: g1
  remote_user: root
  tasks:
    - name: test connection
      ping:
      remote_user: yourname
:::ERROR:::
PLAY [g1] *********************************************************************

GATHERING FACTS ***************************************************************
ok: [xxx.srv.xxx.de]

TASK: [test connection] *******************************************************
fatal: [xxx.srv.xxx.de] => {'msg': "FAILED: ('Bad authentication type', [u'publickey', u'gssapi-with-mic', u'keyboard-interactive']) (allowed_types=[u'publickey', u'gssapi-with-mic', u'keyboard-interactive'])", 'failed': True}

FATAL: all hosts have already failed -- aborting

PLAY RECAP ********************************************************************
           to retry, use: --limit @/home/yourname/x.retry

xxx.srv.xxx.de : ok=1    changed=0    unreachable=1    failed=0

PS: IF i set same password for root and "yourname", It is working fine. 
Is it a bug or am i missing some basic setting in the script? Could anyone please help me with this issue?
Thanks in advance

I take it that what you want to happen is that you use ssh keypairs to
log into the remote system?

To do that you'll need to have a public key for your local user in the
both the remote system's /root/.ssh/authorized_keys file and the
remote system's ~yourname/.ssh/authorized_keys file. From the looks
of the output you have the public key setup correctly in the remote
system's /root/.ssh/authorized_keys file but not in the remote
system's ~yourname/.ssh/authorized_keys file.

The reason is that there's really two tasks being performed in your
playbook. First, ansible runs a setup module task to gather facts
about the remote system. Then it runs the task that you specified
explicitly in the playbook's tasks section. Since you have
remote_user: root specified at the toplevel, the setup task is logging
into the remote system as root and thus using root's authorized_keys
file. Then ansible gets to the second play and sees that you have a
remote_user set to "youruser". So it creates a second ssh connection
to the remote system and attempts to run that task. The fact that
it's failing for this second task means that ssh wasn't able to
authenticate using the private keys that your local user has access
to.

You can solve this by making sure that the yourname account on the
remote system has the proper keys. Or you might find you don't have
to use remote_user: yourname at all. For instance, if you just want
to run a command as yourname and you ar efine logging into the remote
system as root, you could use this instead:

tasks:
    - name: test connection
      ping:
      sudo_user: yourname
      sudo: True

That will still log into the remote syste using the root account since
that's specified in remote_user at the top level but will use sudo to
switch to the yourname account when running the "test connection" task

-Toshio