stackhpc / ansible-role-libvirt-vm

This role configures and creates VMs on a KVM hypervisor.
128 stars 67 forks source link

Changing role variables does nothing to existing domains #82

Open raspbeguy opened 2 years ago

raspbeguy commented 2 years ago

Hello,

I wish there is a way to edit a domain property just by editing the role variable. For now, editing the variables does not affect the domains that are already defined.

For instance, if a domain that has 1024 MB of memory, if I change the memory_mb to 2048 and then execute the role, nothing happens. Same for adding a disk.

Would that be reasonable to fix this behavior ?

markgoddard commented 2 years ago

Hi @raspbeguy, I think that once a domain exists, Ansible won't update it. We should probably keep that default behaviour, but could allow for an override flag that allows a VM to be redefined.

raspbeguy commented 2 years ago

That would be really helpful.

markgoddard commented 2 years ago

To be clear, I don't have time to work on this.