Sure i will thanks. It is true, i am using the vmware_guest module where i 
ommited the validate certificate.But now the problem has been with the dns. 
when I test the  management network, the hostname resolves to the dns, yet i 
ahve errors. 
fatal: [localhost -> localhost]: FAILED! => {"changed": false, "msg": "Unknown 
error while connecting to vCenter or ESXi API at vsecurity.localdomain:443 : 
[Errno -2] Name or service not known"}
Below is my commands....the control node is installed on the esxi
I am sorry to have been asking many questions.
---- name: create vm  hosts: localhost  gather_facts: no  connection: local
  vars:     esxi_host: 'vsecurity.localdomain'     VMWARE_HOST: 
'vsecurity.localdomain'     VMWARE_USER: 'root'     VMWARE_PASSWORD: 'password' 
 tasks:   - vmware_guest:       hostname: "{{ VMWARE_HOST }}"       username: 
"{{ VMWARE_USER }}"       validate_certs: no       password: "{{ 
VMWARE_PASSWORD }}"       folder: /Datastore_2/ans_vm/       name: my_vm_01     
  state: poweredon       guest_id: ubuntu64Guest       # This is hostname of 
particular ESXi server on which user wants VM to be deployed       
esxi_hostname: "{{ esxi_host }}"       disk:       - size_gb: 16         type: 
thin         datastore: Datastore_2       hardware:        memory_mb: 1024      
   num_cpus: 1         scsi: paravirtual       networks:       - name: VM 
Network         mac: 00:0c:29:c2:da:5e         ip: 192.168.154.144         
netmask: 255.255.255.0         device_type: nvmxnet3       wait_for_ip_address: 
true     delegate_to: localhost     register: deploy_vm

Thank you   On Monday, 5 April 2021, 21:13:07 EEST, Jean-Yves LENHOF 
<jean-y...@lenhof.eu.org> wrote:  
 
  
Hi,
 

 
 
Please explain which module you are using when asking questions !
 
 
So have a guess that you are using this one 
 
 
https://docs.ansible.com/ansible/2.8/modules/vmware_guest_module.html#vmware-guest-module
 
 
So two options :
 
- ask to update the certificate with a trusted and not expired one
 
- use "validate_certs" option
 
Regards,
 
JYL
 
 

 
 Le 05/04/2021 à 19:53, bec12...@gmail.com a écrit :
  
 
 
  Okay...thank you. I think now i am having a different error of certifiate.  
    fatal: [localhost -> localhost]: FAILED! => {"changed": false, "msg": 
"Unable to connect to vCenter or ESXi API at vsecurity.com on TCP/443: [SSL: 
CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired 
(_ssl.c:1123)"} 
    I tried to secure copy the rui.crt from vmware esxi via ssh to the ansible 
control node but it fails all the time.
      On Monday, 5 April 2021, 20:16:27 EEST, Dick Visser 
<dick.vis...@geant.org> wrote:  
  
     You're connecting to a host called 'vsecurity', but that doesn't resolve 
to something.  At least not on the host you're trying to run the playbook from. 
 
  On Mon, 5 Apr 2021 at 14:00, rebecca acheampong <bec12...@gmail.com> wrote:
  
I am creating a virtual machine using ansible. I received this error and do not 
know how to solve it. I am new student to both VMware and asnible. This is the 
error i received:  
  fatal: [localhost -> localhost]: FAILED! => {"changed": false, "msg": 
"Unknown error while connecting to vCenter or ESXi API at vsecurity:443 : 
[Errno -3] Temporary failure in name resolution"}  
  Pleae your help is appreciated. I do not use a vcenter -- 
 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/42014b84-ba5a-4f65-afa0-4291a393c96an%40googlegroups.com.
 
   -- 
 Sent from a mobile device - please excuse the brevity, spelling and 
punctuation. -- 
 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 view this discussion on the web visit  
https://groups.google.com/d/msgid/ansible-project/CAL8fbwN8hUp%3DnRAZ7dTRaP_FOWejO5-3Fv96WCrWogRtFpgNMg%40mail.gmail.com
 .
       -- 
 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1434076522.6073543.1617645236935%40mail.yahoo.com.
 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/2d820ea6-9319-064b-7d72-226c709d31c3%40lenhof.eu.org.
  

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/791521619.6125652.1617651819202%40mail.yahoo.com.

Reply via email to