From e98daa9f3992b3648dc1de03754aa4d9aadd8a19 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 12:55:18 +0100 Subject: [PATCH] [PR #9277/403418f7 backport][stable-9] proxmox_template: fix the wrong path called on proxmox_template.task_status (#9475) proxmox_template: fix the wrong path called on proxmox_template.task_status (#9277) fix: add missing 's' on proxmox_template.task_status Missing the 's' means using the wrong API, making log reading impossible. Should fix !9276 Signed-off-by: Alexandre Nicolaie Co-authored-by: Felix Fontein (cherry picked from commit 403418f75da9b23d0cef65ca582ed7f7cdb65e16) Co-authored-by: Alexandre Nicolaie --- ...x-the-wrong-path-called-on-proxmox_template.task_status.yaml | 2 ++ plugins/modules/proxmox_template.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/9277-proxmox_template-fix-the-wrong-path-called-on-proxmox_template.task_status.yaml diff --git a/changelogs/fragments/9277-proxmox_template-fix-the-wrong-path-called-on-proxmox_template.task_status.yaml b/changelogs/fragments/9277-proxmox_template-fix-the-wrong-path-called-on-proxmox_template.task_status.yaml new file mode 100644 index 0000000000..166c040e3b --- /dev/null +++ b/changelogs/fragments/9277-proxmox_template-fix-the-wrong-path-called-on-proxmox_template.task_status.yaml @@ -0,0 +1,2 @@ +bugfixes: + - proxmox_template - fix the wrong path called on ``proxmox_template.task_status`` (https://github.com/ansible-collections/community.general/issues/9276, https://github.com/ansible-collections/community.general/pull/9277). diff --git a/plugins/modules/proxmox_template.py b/plugins/modules/proxmox_template.py index 134286164c..c30f68d3f0 100644 --- a/plugins/modules/proxmox_template.py +++ b/plugins/modules/proxmox_template.py @@ -161,7 +161,7 @@ class ProxmoxTemplateAnsible(ProxmoxAnsible): timeout = timeout - 1 if timeout == 0: self.module.fail_json(msg='Reached timeout while waiting for uploading/downloading template. Last line in task before timeout: %s' % - self.proxmox_api.node(node).tasks(taskid).log.get()[:1]) + self.proxmox_api.nodes(node).tasks(taskid).log.get()[:1]) time.sleep(1) return False