Hello All, I'm using Ansible 2.3 RC2.
According to the sample comments in the code (https://github.com/ansible/ansible-modules-extras/blob/devel/cloud/vmware/vmware_guest.py), this is all I need to get a VM facts: # > # Gather facts only > # > - name: gather the VM facts > vmware_guest: > validate_certs: False > hostname: 192.168.1.209 > username: [email protected] > password: vmware > name: testvm_2 > esxi_hostname: 192.168.1.117 > register: facts But when I run my playbook: - name: Gather Facts about the VMs > hosts: modify > gather_facts: False > connection: local > vars_files: > - group_vars/vault/lab_credentials.yml > tasks: > - name: gather the VM facts > vmware_guest: > validate_certs: False > hostname: "{{ vcenter_hostname }}" > username: "{{ vcenter_user }}" > password: "{{ vcenter_passwd }}" > name: "{{ guest_name }}" > esxi_hostname: "{{ guest_esxhost }}" > register: facts It asks me for the datacenter name: "No datacenter named ha-datacenter was found" I give it the datacenter name in the playbook, but it complaints about datastore name not specified: "Failed to find a matching datastore" Following down down this path I realize that Ansible is trying to create a VM. Why? What am I missing? It is exactly the same code from the samples... -- 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/c40ef510-0595-4121-8b8a-76152afd005f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
