Hi everyone,
I tried using Ansible with our company’s VMware vSphere and could successfully clone a VM from a template. Hooray!
But when I try to execute the playbook a second time, instead of Ansible being idempotent and showing everything als “OK” I get a big red warning:
TASK [Clone the template] ***************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to create a virtual machine : The name 'XXX' already exists."}
Unfortunately the check mode --check
only shows this talk as changed without further information:
TASK [Clone the template] ***************************************************
changed: [localhost] => {"changed": true, "desired_operation": "deploy_vm"}
With Terraform and vSphere I had to ignore some attributes of the VM, like tags, the host it was running on etc. I found no way to do that in Ansible.
Any way I can debug this any further and find out, why Ansible wants to create a new VM?
Kind Regards,
Johannes