Hi,
I am having below things in my Vm's (Vmware free license)
pyvmomi installed in Ubuntu 16 where ansible also installed
(192.168.119.131)
ansible 2.7
Esxi 6.5(192.168.119.129)
1 VM (Ubuntu) in vmware named as Test (192.168.119.130) whose vmware
guest_facts i am finding out through UUID
My host file (Ansible)
[vmware]
192.168.119.129
My Playbook:
---
- name: Running Vmware Playbook
hosts: vmware
tasks:
- name: Printing Vmware Guest Facts
vmware_guest_facts:
hostname: 192.168.119.129
username: root
password: xxxxxxxx
datacenter: vntgautvol-64.localdomain
validate_certs: no
uuid: 56654D56-5A76-EBD5-DCC9-711988D1E157
delegate_to: localhost
register: facts
- debug: var=facts.stdout
Error Statement: I guess my ansible playbook is still accepting ssh
connection but it should use pyvmomi connection may be not sure what to do.
Can anyone help me out ?
Error Log::-
==========
root@ansibleubuntu:~/ansible# ansible-playbook test.yml
PLAY [Running Vmware Playbook]
*********************************************************************************
TASK [Gathering Facts]
*****************************************************************************************
fatal: [192.168.119.129]: UNREACHABLE! => {"changed": false, "msg": "Failed
to connect to the host via ssh: Permission denied
(publickey,keyboard-interactive).\r\n", "unreachable": true}
to retry, use: --limit @/root/ansible/test.retry
PLAY RECAP
*****************************************************************************************************
192.168.119.129 : ok=0 changed=0 unreachable=1 failed=0
On Wednesday, August 29, 2018 at 4:46:32 AM UTC+5:30, Greg Porter wrote:
>
> Well. after further thought...
>
> When I did this, I used the VMware modules, like those at
> https://docs.ansible.com/ansible/latest/modules/list_of_cloud_modules.html#vmware
>
> These require use of the VMware vSphere API Python Bindings , pyvmomi.
> https://github.com/vmware/pyvmomi
>
> You install pyvmomi on the machine you are running the Ansible playbooks
> from.
>
> Then when you run a playbook that uses a VMware module, the playbook uses
> pyvmomi to connect directly to the ESXi hypervisor (or vCenter) using the
> VMware API. Not ssh.
>
> The machine you run playbooks from has to have network access to the ESXi
> hypervisor or vCenter on the various ports that the vSphere API requires.
>
> HTH some more.
>
> Greg
>
>
> On Tuesday, 28 August 2018 16:07:09 UTC-7, Greg Porter wrote:
>>
>> Hmm. Well, by default ESXi hypervisors have ssh turned off. You need to
>> manually go turn it on. Make sure ssh is running on the host.
>> https://pubs.vmware.com/vsphere-6-5/index.jsp?topic=%2Fcom.vmware.vcli.getstart.doc%2FGUID-C3A44A30-EEA5-4359-A248-D13927A94CCE.html
>>
>> HTH
>>
>> Greg
>>
>> On Tuesday, 28 August 2018 07:09:58 UTC-7, Bishwajit Samanta wrote:
>>>
>>> Hi,
>>>
>>> I am trying to connect esxi 6.5 with ansible. I have copied ssh keys
>>> using ssh-copy-id to root id of the esxi server but when i am executing
>>> ansible -m ping vmware(ip) it says permission denied. Any idea how to make
>>> it work out ?
>>>
>>> 192.168.119.129 | UNREACHABLE! => {
>>> "changed": false,
>>> "msg": "Failed to connect to the host via ssh: Permission denied
>>> (publickey,keyboard-interactive).\r\n",
>>> "unreachable": true
>>> }
>>>
>>> Sudoers is not there in esxi servers.. am i missing any point
>>>
>>
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/1afa79f5-59e1-4190-bda5-ec8f01ad62ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.