Ansible Create vSphere Virtual Machine

Ansible playbook fails to deploy Virtual Machine: Can’t Find Folder
How can I deploy a Virtual machine without any Folders within the Cluster ?

Try with :
folder: “{{ yourfolder | d (‘/’) }}”

Hi David

It’s a good pratice that you are able to identify uniqueness of the virtual machine and folder will help you to achieve that.

You already have an answer before that might help you out to achieve what you’re requesting (no folders).
Nevertheless check here https://github.com/js-max/ansible-vmware-new-vm, might help you to speed up things if need to.

Cheers

For everyone else that is wondering what the 'd' filter is, it's an
alias for 'default' :slight_smile:

When i Enter the virtualMachine Name _ Folder I’m getting the following

No Folder /TESTMACHINE match in search path…

Ok I’m using just / as the folder seems to be bypassing that now

but not sure what could be causing the following:: fatal: [localhost → localhost]: FAILED! => {“changed”: false, “msg”: “Failed to create a virtual machine : Unable to access the virtual machine configuration: Unable to access file [vsanDatastore] /win10-template.vmtx”}