ansible-role-libvirt-vm icon indicating copy to clipboard operation
ansible-role-libvirt-vm copied to clipboard

Changing role variables does nothing to existing domains

Open raspbeguy opened this issue 3 years ago • 3 comments

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 ?

raspbeguy avatar Dec 17 '21 14:12 raspbeguy

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.

markgoddard avatar Dec 20 '21 09:12 markgoddard

That would be really helpful.

raspbeguy avatar Dec 20 '21 12:12 raspbeguy

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

markgoddard avatar Dec 20 '21 13:12 markgoddard