community.general/plugins
Tristan Le Guern 1863694297
[PR #831 backport][stable-1] proxmox_kvm: new function wait_for_task() (#933)
* proxmox_kvm: new function wait_for_task() (#831)

Allows some factorization of redundant code in stop_vm(), start_vm(),
create_vm() and main().
This new function also waits one extra second after a successful task execution as the API can be a bit ahead of Proxmox.

Before:

    TASK [ansible-role-proxmox-instance : Ensure test-instance is created]
    changed: [localhost]

    TASK [ansible-role-proxmox-instance : Ensure test-instance is updated]
    fatal: [localhost]: FAILED! => changed=false
      msg: VM test-instance does not exist in cluster.

After:

    TASK [ansible-role-proxmox-instance : Ensure test-instance is created]
    changed: [localhost]

    TASK [ansible-role-proxmox-instance : Ensure test-instance is updated]
    changed: [localhost]

With suggestions from Felix Fontein <felix@fontein.de>.

(cherry picked from commit 9a5fe4c9af)

* Update plugins/modules/cloud/misc/proxmox_kvm.py

Co-authored-by: Felix Fontein <felix@fontein.de>

Co-authored-by: Felix Fontein <felix@fontein.de>
2020-09-18 10:05:23 +02:00
..
action New module: shutdown (#700) 2020-08-18 08:29:38 +02:00
become Fix various sanity errors in plugins (#881) (#893) 2020-09-17 16:39:57 +00:00
cache Clean up deprecations (#504) 2020-06-16 13:15:19 +02:00
callback Fix various sanity errors in plugins (#881) (#893) 2020-09-17 16:39:57 +00:00
connection Fix plugins (names, constants, FQCNs in examples) (#722) 2020-08-18 08:29:44 +02:00
doc_fragments Scaleway - Fix api_token documentation (#747) 2020-08-18 08:30:30 +02:00
filter JC plugin (#750) 2020-08-18 08:30:37 +02:00
inventory Fix various sanity errors in plugins (#881) (#893) 2020-09-17 16:39:57 +00:00
lookup [lookup_plugin/hashi_vault] add missing 'mount_point' param for approle (#897) (#926) 2020-09-17 21:38:46 +02:00
module_utils redfish_command: allow setting the BootSourceOverrideEnabled property (#825) (#915) 2020-09-17 19:50:12 +02:00
modules [PR #831 backport][stable-1] proxmox_kvm: new function wait_for_task() (#933) 2020-09-18 10:05:23 +02:00