mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-22 02:11:26 -07:00
[stable-7] Revert new features to be able to do 7.2.1 release (#7042)
* Revert "[PR #7020/b46d5d81 backport][stable-7] redfish_utils: Add support for "nextLink" property tag pagination (#7026)" This reverts commit1dad95370e
. * Revert "[PR #6914/17b4219b backport][stable-7] proxmox_kvm: enable 'force' restart of vm (as documented) (#6997)" This reverts commit7d68af57af
. * Revert "[PR #6976/d7c1a814 backport][stable-7] [proxmox_vm_info] Re-use cluster resources API to use module without requiring node param (#6993)" This reverts commitfb3768aada
.
This commit is contained in:
parent
eda3d160fa
commit
7cf834fb3c
7 changed files with 146 additions and 423 deletions
|
@ -1111,11 +1111,11 @@ class ProxmoxKvmAnsible(ProxmoxAnsible):
|
|||
return False
|
||||
return True
|
||||
|
||||
def restart_vm(self, vm, force, **status):
|
||||
def restart_vm(self, vm, **status):
|
||||
vmid = vm['vmid']
|
||||
try:
|
||||
proxmox_node = self.proxmox_api.nodes(vm['node'])
|
||||
taskid = proxmox_node.qemu(vmid).status.reset.post() if force else proxmox_node.qemu(vmid).status.reboot.post()
|
||||
taskid = proxmox_node.qemu(vmid).status.reboot.post()
|
||||
if not self.wait_for_task(vm['node'], taskid):
|
||||
self.module.fail_json(msg='Reached timeout while waiting for rebooting VM. Last line in task before timeout: %s' %
|
||||
proxmox_node.tasks(taskid).log.get()[:1])
|
||||
|
@ -1493,7 +1493,7 @@ def main():
|
|||
if vm['status'] == 'stopped':
|
||||
module.exit_json(changed=False, vmid=vmid, msg="VM %s is not running" % vmid, **status)
|
||||
|
||||
if proxmox.restart_vm(vm, force=module.params['force']):
|
||||
if proxmox.restart_vm(vm):
|
||||
module.exit_json(changed=True, vmid=vmid, msg="VM %s is restarted" % vmid, **status)
|
||||
|
||||
elif state == 'absent':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue