Open sepetuks opened 1 year ago
I'll add the "me too" to this.
1) The documentation identifies library_id as unused if library_item_id is passed in, but without library_id the process fails with invalid values. 2) WHen passing both library_id and library_item_id the process behaves as if ONLY library_id is passed and attempts to create the OVF container object before uploading to it. If the OVF container object exists, ansible returns "green" and does nothing.
Ran into the same problem. Sending an updated image to the local CL results in changed: false
and the new image isn't exported to the local CL.
[user@ansible] ➤ ansible --version
ansible [core 2.11.12]
config file = /home/user/.ansible.cfg
configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/ansible/os9_prov_vmw_20230117/lib64/python3.6/site-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/ansible/os9_prov_vmw_20230117/bin/ansible
python version = 3.6.8 (default, Aug 13 2020, 07:46:32) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
jinja version = 3.0.3
libyaml = True
Also using 2.2.0 of the collection:
[user@ansible] ➤ ansible-galaxy collection list | grep vmware_rest
vmware.vmware_rest 2.2.0
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: vSphere Client version 7.0.3.01100
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: ansible-galaxy collection install -f -r collections/requirements.yml -p collections
(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?
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)