-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vmware.vmware_rest.vcenter_ovf_libraryitem - Update existing template #385
Comments
I'll add the "me too" to this.
|
Ran into the same problem. Sending an updated image to the local CL results in
Also using 2.2.0 of the collection:
I am able to send the image to vCenter and manually "update" the version in the CL. Workaround for now is to delete the image from the local CL and allow the task to re-create it. vSphere: |
Can confirm this is functional on 2.1.5 of VMWare Rest Library. Downgrading to 2.1.5 in a collections/requirements.yml will provide full functionality in pushing uploads of OVF to VMware. collections/requirements.yml:
Then Run: (The above installs the collections to a local "collections" directory in your repo, YMMV on the above command). This will install 2.1.5 of the rest collection into ansible and you should see things work from there. You will need to pass in BOTH library_id AND library_item_id to get it to function (Their documentation is also dead wrong with no examples). |
So...we've now released 3.0, but no one can upgrade to it that's using library functionality because this bug still exists? |
Is there a replacement for this module in vmware.vmware? I'm having the same issue, it's not 'changing' and updating the existing template. Maybe @mikemorency has some info on this one? |
unfortunately i dont see a module that can act as a work around for this particular issue. Ill investigate in the next couple of days and see what options we have to resolve the issue |
@mikemorency I found something by mistake. If I try to update an existing template by including target.template_item_id, but I use a create_spec.name that's different than the existing template, it updates/changes. The template name is not honoring the create_spec.name. The name of the template was "Windows Server 2022 Datacenter". It updated the template per the task result below, but the template name remained the same (no ' - Nov 2024'). value: Update: It still works as expected with the create_spec.name commented out. So, include the name if you're making a net new template, exclude the name and include an id if you're updating an existing. The description updates as well, but the name does not. I think just the docs need updating unless something new to replace this is coming to vmware.vmware. |
Part of the issue is that the REST endpoint does not support updating template metadata without re-creating the template, see here. The other part of the issue is that the generated module code uses just the Long term, this module is not ideal and should be re-written in vmware.vmware. Short term, the workaround given by @billy-stellar will work for updating the description. I will update the module's examples and description in the next release to reflect this quirk and leave this issue open as a reminder to migrate the modules functionality eventually. |
SUMMARY Related to the discussion in #385 This change updates the module documentation to mention that template metadata is not updated as expected. It also includes a workaround so users can update the template description if needed. ISSUE TYPE Docs Pull Request COMPONENT NAME vcenter_ovf_libraryitem Reviewed-by: Anna Savina Reviewed-by: mikemorency
SUMMARY
I am trying to update existing OVF template but it looks it is not updating it when I provide library_item_id.
All works ok when I need first OVF template to be cloned to library but I do not succed updateing Connten library template with new versions.
As per documentation"
- library_item_id (str)
: Identifier of the library item that should be should be updated. (['present'])https://github.com/ansible-collections/vmware.vmware_rest/blob/main/docs/vmware.vmware_rest.vcenter_ovf_libraryitem_module.rst
Per documentation I read it should be possible. So I either thats issue with documentation or with code.
ISSUE TYPE
COMPONENT NAME
vmware.vmware_rest.vcenter_ovf_libraryitem
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
vCenter 7.0 Update 3j (20990077)
STEPS TO REPRODUCE
EXPECTED RESULTS
I would expect second task would do OVF template update, but task just finished without actions (no failure)
ACTUAL RESULTS
Second task is always giving status "ok" (I would expect changed)
The text was updated successfully, but these errors were encountered: