stackhpc / ansible-role-libvirt-host

This role configures a host as a Libvirt/KVM hypervisor. It can also configure storage pools and networks on the host.
36 stars 32 forks source link

Role idempotence #33

Open Tcharl opened 4 years ago

Tcharl commented 4 years ago

Hi folks,

This role rocks, thank you so much!

I made some little molecule tests over it: I can PR if you want to: https://github.com/OsgiliathEnterprise/ansible-virtualization

However, molecule is telling me that this role is not really idempotent (replace tcharl by yours, it's just a wrapper):

Do you want me to investigate? PR the tests and CI? Will you review (and potentially merge it) or should I maintain my fork? Best regards,

markgoddard commented 4 years ago

Hi Charlie. We would love some molecule tests. If they have found an issue that needs addressing, then even better.

Tcharl commented 4 years ago

Here they are !32 . You'll notice that I disabled "idempotence" tests: I'll try to fix them but not sure I'll succeed

Tcharl commented 4 years ago

Role is now totally idempotent for default configuration (to be honest, I don't know what I modified in my latest commit which makes the magic happen for the default role) so ready to merge for me. I slightly modified the role spec to reuse the existing lvm role: the previous version had some drawbacks IMO: