I am running into an issue with the vmware.vmware.deploy_content_library_template module in my playbook.
Brief summary of how its being used:
I have an Azure Devops pipeline that runs the playbook via an ansible container in our Azure. The container is running:
Anisble core v2.18.6
Python v3.12.11
Aiohttp v3.12.9
community.vmware v5.6.0
vmware.vmware v1.11.0
VMware vSphere Automation SDK for Python v1.87.0
The specific module is displayed below:
- name: Deploy VM from OVF Template
vmware.vmware.deploy_content_library_template:
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
validate_certs: false
library_item_name: "{{ ovf_template }}"
library_name: "{{ content_library }}"
vm_name: "{{ vm_name }}"
datacenter: "{{ datacenter }}"
datastore: "{{ vm_datastore }}"
esxi_host: "{{ esx_hostname }}"
cluster: "{{ cluster }}"
vm_folder: "{{ vmfolder }}"
register: deploy_result
when: not reconfigure and vm_exist is undefined
The error I am experiencing is here with sensitive variables marked out:
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"cluster": null,
"datacenter": "Plzen",
"datastore": "************",
"datastore_cluster": null,
"esxi_host": "***********",
"hostname": "***************",
"library_id": null,
"library_item_id": null,
"library_item_name": "*********************",
"library_name": "****************",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 443,
"power_on_after_deploy": false,
"proxy_host": null,
"proxy_port": null,
"proxy_protocol": "https",
"resource_pool": null,
"username": "*************************",
"validate_certs": false,
"vm_folder": "/Plzen/vm",
"vm_name": "***********"
}
},
"msg": "Unable to find folder with absolute path Plzen/vm"
}
I have confirmed the file path using the community.vmware.vmware_folder_info module and the community.vmware.vmware_vm_info module on other running VMS on the host.
This is a recent issue as prior to this, we were using an older version of ansible and utilizing the now deprecated community.vmware.vmware_content_deploy_template module. With everything updated to make use of newly added modules, I am running into this issue and cant get past this task in my playbook.
I have tried various different ways of file path naming as well as exluding defining the variable entirely but all have come back with this same error. All tasks prior to this one execute with no issue.
Any help would be greatly appreciated as I am at a loss with what the issue could be.