mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
* Fix Proxmox `node`, `name` condition.
* Add changelog entry.
(cherry picked from commit 0338eb7a7c)
Co-authored-by: Markus Reiter <me@reitermark.us>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- proxmox_kvm - fix wrong condition (https://github.com/ansible-collections/community.general/pull/5108).
|
||||
@@ -1234,7 +1234,7 @@ def main():
|
||||
module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid)
|
||||
elif proxmox.get_vmid(name, ignore_missing=True) and not (update or clone):
|
||||
module.exit_json(changed=False, vmid=proxmox.get_vmid(name), msg="VM with name <%s> already exists" % name)
|
||||
elif not (node, name):
|
||||
elif (not node) or (not name):
|
||||
module.fail_json(msg='node, name is mandatory for creating/updating vm')
|
||||
elif not proxmox.get_node(node):
|
||||
module.fail_json(msg="node '%s' does not exist in cluster" % node)
|
||||
|
||||
Reference in New Issue
Block a user