Error in configuration

Dear All,
I am receiving this error when I tried to execute server.yml file. Anyone please suggest appropriate changes that i need to do in inventory file, host file or server.yml.
I tried to execute this playbook against local-host.

administrator@JAVALAB01-43:~/nephele/ansible$ ansible-playbook -i inventory server.yml

PLAY [servers] *****************************************************************

TASK [Gathering Facts] *********************************************************
fatal: [localhost]: UNREACHABLE! => {“changed”: false, “msg”: “Failed to connect to the host via ssh: root@localhost: Permission denied (publickey,password).”, “unreachable”: true}

PLAY RECAP *********************************************************************

localhost : ok=0 changed=0 unreachable=1 failed=0 skipped=0 rescued=0 ignored=0

Regards,
Ashwini Kumar Jha

Hi

You have provided very little information. Please provide at least the playbook and your inventory.

May be password authentication is off in host machines or may be you haven’t provide keys in hostmachines.

You are Performing this in localhost so you have to pass ssh keys in it or make small changes in the ssh config file.

Yes, please provide additional details. At first look, the issue appears to be SSH related.
Are you configuring Ansible user to SSH credential login with password ?

  1. Please check the manual ssh to any one host.
  2. then try to use the ping module to see if it works. (ansible -i host -m ping --limit-host
    Mostly it will solve your problem. if not,
  3. change the login user with -u and -k pass the password.

Please share logs if still not working.