Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxmox_template: 501 Not Implemented when using the uri field #9276

Open
1 task done
xunleii opened this issue Dec 17, 2024 · 2 comments · May be fixed by #9277
Open
1 task done

proxmox_template: 501 Not Implemented when using the uri field #9276

xunleii opened this issue Dec 17, 2024 · 2 comments · May be fixed by #9277
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)

Comments

@xunleii
Copy link

xunleii commented Dec 17, 2024

Summary

When I use the uri field with proxmox_template to delegate the template download to Proxmox, the task fails with a message of the type

Fetching template from url <ISO's URL> failed with error: 501 Not Implemented: Method 'GET /node/<redacted>/tasks/UPID:<redacted>:download:<redacted>:<redacted>:/log' not implemented"

The issue is the missing s in node on self.proxmox_api.node(node).tasks(taskid).log.get()[:1]) that call the wrong API path.

Issue Type

Bug Report

Component Name

proxmox_template

Ansible Version

$ ansible --version
ansible [core 2.16.5]
  config file = None
  configured module search path = ['/home/vscode/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /nix/store/a5k2lpbxj419kzn2pyz55gql35pbg8xx-python3.12-ansible-core-2.16.5/lib/python3.12/site-packages/ansible
  ansible collection location = /home/vscode/.ansible/collections:/usr/share/ansible/collections
  executable location = /nix/store/a5k2lpbxj419kzn2pyz55gql35pbg8xx-python3.12-ansible-core-2.16.5/bin/ansible
  python version = 3.12.4 (main, Jun  6 2024, 18:26:44) [GCC 13.3.0] (/nix/store/04gg5w1s662l329a8kh9xcwyp0k64v5a-python3-3.12.4/bin/python3.12)
  jinja version = 3.1.4
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
# /home/vscode/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 10.1.0 

# /nix/store/kxx2qjjm9la1fl1wcj7pck9lpkmva810-python3.12-ansible-10.1.0/lib/python3.12/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 9.1.0  

Configuration

$ ansible-config dump --only-changed
CONFIG_FILE() = None
PAGER(env: PAGER) = less

OS / Environment

Ubuntu 24.04.1 LTS (Devcontainer running on WSL)
Ansible and Proxmoxer installed using Nix

Steps to Reproduce

      name: Download the Kairos OS image on Proxmox VE cluster
      community.general.proxmox_template:
        node: <redacted>
        api_user: <redacted>
        api_password: <redacted>
        api_host: <redacted>
        url: https://github.com/kairos-io/kairos/releases/download/v3.2.4/kairos-alpine-3.19-standard-amd64-generic-v3.2.4-k3sv1.31.3+k3s1.iso
        content_type: iso
        state: present
        storage: local

Expected Results

Should download the ISO directly on Proxmox without issues

Actual Results

TASK [Download the Kairos OS image on Proxmox VE cluster] *******************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Fetching template from url https://github.com/kairos-io/kairos/releases/download/v3.2.4/kairos-alpine-3.19-standard-amd64-generic-v3.2.4-k3sv1.31.3%2Bk3s1.iso failed with error: 501 Not Implemented: Method 'GET /node/<redacted>/tasks/UPID:<redacted>:download:<redacted>:<redacted>:/log' not implemented"}

The download is successfully launched, but Proxmox unfortunately fails.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug has_pr module module plugins plugin (any type) labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)
Projects
None yet
2 participants