1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/changelogs/fragments
patchback[bot] 33cf4877f5
proxmox_kvm: fix idempotency issue with state=absent (#811) (#914)
When the `vmid` parameter is not supplied and the module can only rely on
name look-up an early failure can happen if the targeted VM doesn't exist.
In this case a task execution with the parameter `state` set to `absent`
will actually fail instead of being considered ok.

This patch introduces a deferred error-checking for non-existent VMs
by assigning the value -1 to the `vmid` parameter, allowing the actual
verification to be performed in the right code paths.
Is also help to differentiate between a non-existent `vmid` or non-existent
VM `name`.

Previously:

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

Now:

    TASK [ansible-role-proxmox-instance : Remove instance-test]
    ok: [localhost]
    ...
    TASK [ansible-role-proxmox-instance : Remove instance-test]
    ok: [localhost]

Update changelogs/fragments/811-proxmox-kvm-state-absent.yml

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

(cherry picked from commit 73f8338980)

Co-authored-by: Tristan Le Guern <tleguern@bouledef.eu>
2020-09-17 19:41:19 +02:00
..
.keep Rename changelogs/fragments/.empty -> changelogs/fragments/.keep 2020-08-07 08:18:40 +02:00
563-update-terraform-status-test.yaml Fix terraform changed status detection test (#561) (#563) (#908) 2020-09-17 19:23:43 +02:00
777-interfaces_file-re-escape.yml interfaces_file: re.escape() old value (#880) 2020-09-12 20:10:31 +02:00
789-pkg5-wrap-to-modify-package-list.yaml pkg5: wrap 'to modify' package list (#789) (#911) 2020-09-17 19:29:44 +02:00
796-postgresql_privs-grant-option-bug.yaml postgresql_privs: Fix bug with grant_option (#796) (#912) 2020-09-17 19:34:28 +02:00
802-pushover-device-parameter.yml Specify device for Pushover notification (#802) (#913) 2020-09-17 19:41:11 +02:00
811-proxmox-kvm-state-absent.yml proxmox_kvm: fix idempotency issue with state=absent (#811) (#914) 2020-09-17 19:41:19 +02:00
homebrew-cask-at-symbol-fix.yaml Fix for error trying to install cask with '@' in the name (#763) (#910) 2020-09-17 19:41:00 +02:00