community.general icon indicating copy to clipboard operation
community.general copied to clipboard

community.general.proxmox module - adding disks - better examples

Open riaanp78 opened this issue 1 year ago • 6 comments

Summary

I was playing with the community.general.proxmox module and i was able to clone my template perfect and update the cloud init details without hassle. But i am struggling to add new disks to an existing VM. Is it something I am doing wrong or is the support limited for adding?

Code example i am using / playing with:

`

  • name: Update VMs community.general.proxmox_kvm: api_host: "{{ api_host }}" api_user: "{{ api_user }}" api_password: "{{ api_password }}" cores: "{{ item.cores }}" sockets: "{{ item.sockets }}" memory: "{{ item.memory }}" update: yes ciuser: mylinuxuser cipassword: supersecret vmid: "{{ item.vmid }}" node: "{{ node }}" name: "{{ item.name }}" ipconfig: ipconfig0: "ip={{ item.ipaddress}},gw={{ item.gw }}" scsi: scsi0: "datastore:10,format=qcow2"

`

Not complaining but better examples for more use cases would be nice. Most people do this:

  1. clone VM template
  2. adjust cloned VM settings e.g. IP/GW/user etc
  3. add additional disks to template
  4. start cloned VM template

Just want to know if i am doing it wrong with my update attempt?

Issue Type

Documentation Report

Component Name

community.general.proxmox module

Ansible Version

$ ansible --version

ansible [core 2.13.5] config file = None configured module search path = ['/home/xxxx/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules'] ansible python module location = /home/xxxx/.local/lib/python3.9/site-packages/ansible ansible collection location = /home/xxxx/.ansible/collections:/usr/share/ansible/collections executable location = /home/xxxx/.local/bin/ansible python version = 3.9.7 (default, May 10 2022, 23:45:56) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10)] jinja version = 3.1.2 libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general

/home/xxxx/.ansible/collections/ansible_collections

Collection Version


community.general 5.7.0

/home/xxxx/.local/lib/python3.9/site-packages/ansible_collections

Collection Version


community.general 5.6.0

Configuration

$ ansible-config dump --only-changed

OS / Environment

Rocky Linux 8.x Proxmox 7.2-3

Additional Information

No response

Code of Conduct

  • [X] I agree to follow the Ansible Code of Conduct

riaanp78 avatar Oct 13 '22 09:10 riaanp78

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 avatar Oct 13 '22 09:10 ansibullbot

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

ansibullbot avatar Oct 13 '22 09:10 ansibullbot

good day, I am going to assume the short answer is no. no ansible does not have support for this.

riaanp78 avatar Oct 18 '22 07:10 riaanp78

Never mind i found this mode hidden in the document index: https://docs.ansible.com/ansible/latest/collections/community/general/proxmox_disk_module.html#ansible-collections-community-general-proxmox-disk-module

riaanp78 avatar Oct 20 '22 07:10 riaanp78

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 avatar Nov 05 '22 07:11 ansibullbot