ansible-collections / community.general

Ansible Community General Collection
https://galaxy.ansible.com/ui/repo/published/community/general/
GNU General Public License v3.0
825 stars 1.53k forks source link

proxmox_kvm: Allow API port to be specified #8440

Closed tgouverneur closed 5 months ago

tgouverneur commented 5 months ago

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

ansibullbot commented 5 months ago

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 commented 5 months ago

cc @Ajpantuso @Thulium-Drake @UnderGreen @helldorado @joshainglis @karmab @krauthosting click here for bot help

florianfischer91 commented 5 months ago

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