mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fix vm removal in proxmox_pool_member.py (#7464)
* fix vm removal in proxmox_pool_member.py in the original the vm doesn't get removed, always errors with "'Failed to delete a member (12345) from the pool TestPool: list.remove(x): x not in list' * add changelog fragment * fix linting errors in changelog
This commit is contained in:
parent
ab0b85d7d2
commit
0304989392
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- proxmox_pool_member - absent state for type VM did not delete VMs from the pools (https://github.com/ansible-collections/community.general/pull/7464).
|
|
@ -192,7 +192,7 @@ class ProxmoxPoolMemberAnsible(ProxmoxAnsible):
|
|||
self.module.exit_json(changed=False, poolid=poolid, member=member,
|
||||
diff=diff, msg="VM {0} is not part of the pool {1}".format(member, poolid))
|
||||
|
||||
all_members_after.remove(member)
|
||||
all_members_after.remove(vmid)
|
||||
|
||||
if not self.module.check_mode:
|
||||
self.proxmox_api.pools(poolid).put(vms=[vmid], delete=1)
|
||||
|
|
Loading…
Reference in a new issue