mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
[5.0.0] Bump version to 5.0.0, remove deprecated features (#4516)
* Remove deprecated features. * Fix changelog. * Remove ignore.txt entries. * One more. * Remove state=get tests.
This commit is contained in:
parent
29c49febd9
commit
54b2f0819d
28 changed files with 79 additions and 500 deletions
|
@ -1187,7 +1187,7 @@ def main():
|
|||
module.fail_json(msg="Can't get the next vmid for VM {0} automatically. Ensure your cluster state is good".format(name))
|
||||
else:
|
||||
clone_target = clone or name
|
||||
vmid = proxmox.get_vmid(clone_target, ignore_missing=True, choose_first_if_multiple=True)
|
||||
vmid = proxmox.get_vmid(clone_target, ignore_missing=True)
|
||||
|
||||
if clone is not None:
|
||||
# If newid is not defined then retrieve the next free id from ProxmoxAPI
|
||||
|
@ -1205,7 +1205,7 @@ def main():
|
|||
proxmox.get_vm(vmid)
|
||||
|
||||
# Ensure the choosen VM name doesn't already exist when cloning
|
||||
existing_vmid = proxmox.get_vmid(name, ignore_missing=True, choose_first_if_multiple=True)
|
||||
existing_vmid = proxmox.get_vmid(name, ignore_missing=True)
|
||||
if existing_vmid:
|
||||
module.exit_json(changed=False, vmid=existing_vmid, msg="VM with name <%s> already exists" % name)
|
||||
|
||||
|
@ -1231,8 +1231,8 @@ def main():
|
|||
try:
|
||||
if proxmox.get_vm(vmid, ignore_missing=True) and not (update or clone):
|
||||
module.exit_json(changed=False, vmid=vmid, msg="VM with vmid <%s> already exists" % vmid)
|
||||
elif proxmox.get_vmid(name, ignore_missing=True, choose_first_if_multiple=True) and not (update or clone):
|
||||
module.exit_json(changed=False, vmid=proxmox.get_vmid(name, choose_first_if_multiple=True), msg="VM with name <%s> already exists" % name)
|
||||
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):
|
||||
module.fail_json(msg='node, name is mandatory for creating/updating vm')
|
||||
elif not proxmox.get_node(node):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue