Proxmox module refactoring (#9225)
* proxmox: Refactor This is a squash of the following commits for easier rebasing: proxmox module_utils: make use of choose_first_if_multiple in get_vm proxmox: refactor module proxmox: add changelog proxmox: fix deprecation message proxmox: remove type hints proxmox: remove spaces for keywords proxmox: run formatter proxmox: make compabtible with old python versions proxmox: remove f-strings proxmox: fix string formatting in build_volume proxmox: revert disk size parameter to simple integer proxmox: update changelog fragment proxmox: fix argument spec proxmox: fix size handling in build_volume proxmox: fix formatting proxmox: update changelog fragment * proxmox: Fix changelog fragment, doc, and deprecation string formatting. * proxmox: Fix formatting in imports * proxmox: require one of `vmid` or `hostname`, simplify checks * proxmox: apply check for supported features to entire module * proxmox: move parameter conversions inside create and update functionspull/9646/head
parent
25a262bdcf
commit
d71ba0fae8
|
@ -0,0 +1,11 @@
|
|||
minor_changes:
|
||||
- proxmox - refactors the proxmox module (https://github.com/ansible-collections/community.general/pull/9225).
|
||||
|
||||
bugfixes:
|
||||
- proxmox - fixes idempotency of template conversions (https://github.com/ansible-collections/community.general/pull/9225, https://github.com/ansible-collections/community.general/issues/8811).
|
||||
- proxmox - fixes issues with disk_volume variable (https://github.com/ansible-collections/community.general/pull/9225, https://github.com/ansible-collections/community.general/issues/9065).
|
||||
- proxmox - fixes incorrect parsing for bind-only mounts (https://github.com/ansible-collections/community.general/pull/9225, https://github.com/ansible-collections/community.general/issues/8982).
|
||||
- proxmox module utils - fixes ignoring of ``choose_first_if_multiple`` argument in ``get_vmid`` (https://github.com/ansible-collections/community.general/pull/9225).
|
||||
|
||||
deprecated_features:
|
||||
- proxmox - removes default value ``false`` of ``update`` parameter. This will be changed to a default of ``true`` in community.general 11.0.0 (https://github.com/ansible-collections/community.general/pull/9225).
|
|
@ -144,7 +144,7 @@ class ProxmoxAnsible(object):
|
|||
return None
|
||||
|
||||
self.module.fail_json(msg='No VM with name %s found' % name)
|
||||
elif len(vms) > 1:
|
||||
elif len(vms) > 1 and not choose_first_if_multiple:
|
||||
self.module.fail_json(msg='Multiple VMs with name %s found, provide vmid instead' % name)
|
||||
|
||||
return vms[0]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue