-
Bug
-
Resolution: Duplicate
-
Undefined
-
None
-
Unspecified
-
False
-
-
False
-
-
https://github.com/ansible-collections/vmware.vmware_rest/issues/385
<!--- Verify first that your issue is not already reported on GitHub -->
<!--- Also test if the latest release and devel branch are affected too -->
<!--- Complete all sections as described, this form is processed automatically -->
-
-
-
-
- SUMMARY
<!--- Explain the problem briefly below -->
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.
- SUMMARY
-
-
-
-
-
-
-
- ISSUE TYPE
-
-
-
- Bug Report
-
-
-
-
- COMPONENT NAME
<!--- Write the short name of the module, plugin, task or feature below, use your best guess if unsure -->
vmware.vmware_rest.vcenter_ovf_libraryitem
- COMPONENT NAME
-
-
-
-
-
-
-
- ANSIBLE VERSION
<!--- Paste verbatim output from "ansible --version" between quotes -->
```paste below
ansible [core 2.13.7]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/home/henris/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/henris/.local/lib/python3.8/site-packages/ansible
ansible collection location = /home/henris/.ansible/collections:/usr/share/ansible/collections
executable location = /home/henris/.local/bin/ansible
python version = 3.8.10 (default, Nov 14 2022, 12:59:47) [GCC 9.4.0]
jinja version = 3.1.2
libyaml = True
```
- ANSIBLE VERSION
-
-
-
-
-
-
-
- COLLECTION VERSION
<!--- Paste verbatim output from "ansible-galaxy collection list <namespace>.<collection>" between the quotes
for example: ansible-galaxy collection list community.general
-->
```paste below
Collection Version-
-
-
-
-
-
-
-
-
-
-
-
- -------
vmware.vmware_rest 2.2.0
```
- -------
-
-
-
-
-
-
-
-
-
-
-
-
- COLLECTION VERSION
-
-
-
-
-
-
-
- CONFIGURATION
<!--- Paste verbatim output from "ansible-config dump --only-changed" between quotes -->
```paste below
- CONFIGURATION
-
-
-
```
-
-
-
-
- OS / ENVIRONMENT
<!--- Provide all relevant information below, e.g. target OS versions, network device firmware, etc. -->
vCenter 7.0 Update 3j (20990077)
- OS / ENVIRONMENT
-
-
-
-
-
-
-
- STEPS TO REPRODUCE
<!--- Describe exactly how to reproduce the problem, using a minimal test-case -->
- STEPS TO REPRODUCE
-
-
-
<!--- Paste example playbooks or commands between quotes below -->
```yaml
- name: Export the VM as an OVF on the library (new)
vmware.vmware_rest.vcenter_ovf_libraryitem:
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: false
vcenter_rest_log_file: '/tmp/rest.log'
session_timeout: 2900
source:
type: VirtualMachine
id: '{{ vm1_info.id }}'
target:
library_id: '{{ library_id }}'
create_spec:
name: golden
description: an OVF example
flags: []
state: present
delegate_to: localhost
tags: library
- name: Export the VM as an OVF on the library (update)
vmware.vmware_rest.vcenter_ovf_libraryitem:
vcenter_hostname: "{{ vcenter_hostname }}"
vcenter_username: "{{ vcenter_username }}"
vcenter_password: "{{ vcenter_password }}"
vcenter_validate_certs: false
vcenter_rest_log_file: '/tmp/rest.log'
session_timeout: 2900
source:
type: VirtualMachine
id: '{{ vm1_info.id }}'
target:
library_id: '{{ library_id }}'
library_item_id: '{{ library_item_id }}'
create_spec:
name: golden
description: an OVF example2
flags: []
state: present
delegate_to: localhost
tags: library
```
<!--- HINT: You can paste gist.github.com links for larger files -->
-
-
-
-
- EXPECTED RESULTS
<!--- Describe what you expected to happen when running the steps above -->
I would expect second task would do OVF template update, but task just finished without actions (no failure)
- EXPECTED RESULTS
-
-
-
-
-
-
-
- ACTUAL RESULTS
<!--- Describe what actually happened. If possible run with extra verbosity (-vvvv) -->
Second task is always giving status "ok" (I would expect *changed*)
- ACTUAL RESULTS
-
-
-
<!--- Paste verbatim command output between quotes -->
```paste below
TASK [Export the VM as an OVF on the library (new)] ********************************************************************
changed: [Template -> localhost]
TASK [Export the VM as an OVF on the library (update)] *****************************************************************
ok: [Template -> localhost]
```