Error in configuration

92 views
Skip to first unread message

Ashwini Jha

unread,
Jun 27, 2020, 1:11:40 AM6/27/20
to Ansible Project
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

Dick Visser

unread,
Jun 27, 2020, 12:18:17 PM6/27/20
to ansible...@googlegroups.com
Hi

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

--
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-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5e861c6d-03b9-4efb-a0b3-b9a1ff1f4682n%40googlegroups.com.
--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.

Tej Singh Rana

unread,
Jun 27, 2020, 12:44:21 PM6/27/20
to ansible...@googlegroups.com
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. 
 

Will Brown

unread,
Jun 28, 2020, 2:49:51 PM6/28/20
to Ansible Project
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 ?

OM Nachiketa

unread,
Jun 28, 2020, 11:03:33 PM6/28/20
to ansible...@googlegroups.com
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 <the host you successfully ssh to>
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.

--
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-proje...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages