cloudscale-ch / ansible-collection-cloudscale

cloudscale.ch Ansible Collection
https://galaxy.ansible.com/cloudscale_ch/cloud
GNU General Public License v3.0
7 stars 3 forks source link

`volume_size_gb` only works when creating a new VM but gets ignored afterwards #103

Open ombre8 opened 1 week ago

ombre8 commented 1 week ago

volume_size_gb does not update the size of the root-disk, when changed in ansible:

---

- name: Using cloudscale.ch collection
  hosts: localhost
  collections:
    - cloudscale_ch.cloud
  tasks:
    - server:
        name: test1
        image: debian-12
        flavor: flex-4-1
        ssh_keys:
          - ssh-rsa notrelevant
        zone: lpg1
        api_token: secret
    - server:
        name: test1
        image: debian-12
        flavor: flex-4-1
        volume_size_gb: 20
        ssh_keys:
          - ssh-rsa notrelevant
        zone: lpg1
        api_token: secret

Output:


PLAY [Using cloudscale.ch collection] ******************************************************************************

TASK [server] ******************************************************************************************************
changed: [localhost]

TASK [server] ******************************************************************************************************
ok: [localhost]

PLAY RECAP *********************************************************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0  

I would expect this to scale the root disk to 20G. Also, the Module doesn't fail if I specify something smaller than deployed in Ansible, which led to confusion on our side in the past.

href commented 1 week ago

Thanks for your issue. I'll make sure we tackle this in our next sprint. I agree that this seems buggy.