On 08.12.2017 13:55, phrant...@gmail.com wrote:
Hello Guys,

I am new in Ansible but I like and I am eager to dig deeper in it.

Anyway, I am trying to use vmware_vm_facts module in order get any VM list from vCenter however I got "Failed to connect to the host via ssh:..."

Is always better if you can show the hole error message of the run.
Even run it with -vvvv


Why does vmware module try ssh connection to vCenter ? I was thinking that
API should be used. What am I missing...?

Maybe because you have changed localhost in your inventory?


If  it matters
---
- host: vcenter
  task:
  - name: registered vms
    vmware_vm_facts:
       hostname: vcenter
       username: test
       password: ********
    delegate_to: localhost
    register: vmfacts

  - debug:
       var: vmfacts.virtual_machines

It always matter, the more relevant information the better or else we are bling.

You haven't told us your Ansible version, but if it's 2.4 run this

ANSIBLE_STDOUT_CALLBACK=debug ansible-playbook -vvvv playbook.yml



--
Kai Stian Olstad

--
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/da9218217cf9ceba241ea41b4d606d54%40olstad.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to