ansible-collections / community.general

Ansible Community General Collection

Home Page:https://galaxy.ansible.com/ui/repo/published/community/general/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

proxmox_kvm: Allow API port to be specified

tgouverneur opened this issue · comments

Summary

Hello,

I've started using proxmox_kvm from this repository to create VMs on my proxmox cluster. While setting it up, I've noticed there was no way to specify the API port to be used against the api_host. This is a problem for me as I have a reverse proxy behind my proxmox API that does handle SSL certificate and balancing against my nodes, so I would rather use this instead of connecting to any particular node.

I've already implemented the necessary changes on modules_utils/proxmox.py and tested them against my use case and it's working.

I'd eventually would like to submit a PR for this change if anyone thinks it's valuable enough.

Issue Type

Feature Idea

Component Name

proxmox_kvm

Additional Information

- name: Create Proxmox VM
  community.general.proxmox_kvm:
    api_user: "root@pve"
    api_token_id: "ansible"
    api_token_secret: "secret-token-id"
    api_host: "vms.test.com"
    api_port: "443"
    validate_certs: yes
    vmid: "9000"
    format: qcow2
    node: "nodeA"
    name: "test01"
    storage: "local-lvm"
  register: create_vm

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

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

Isn't it possible to just add the port to the host like my.cluster.com:443?
https://proxmoxer.github.io/docs/latest/basic_usage/#changing-ports