Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Role idempotence #33

Open
Tcharl opened this issue May 11, 2020 · 3 comments
Open

Role idempotence #33

Tcharl opened this issue May 11, 2020 · 3 comments

Comments

@Tcharl
Copy link

Tcharl commented May 11, 2020

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):

  • [Fedora-Molecule-Virtualization] => tcharl.ansible_role_libvirt_host : Ensure the libvirt daemon is started and enabled
  • [Fedora-Molecule-Virtualization] => tcharl.ansible_role_libvirt_host : Ensure libvirt storage pools are active
  • [Fedora-Molecule-Virtualization] => tcharl.ansible_role_libvirt_host : Ensure libvirt networks are active

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
Copy link
Member

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

@Tcharl
Copy link
Author

Tcharl commented May 12, 2020

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
Copy link
Author

Tcharl commented May 13, 2020

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:

  • The user was forced to have lvm2 package installed to run this role, which failed otherwise
  • The VG was created the time this role was run: which could be very harmful in some use case
  • The mrjsmith role do more than only consuming the 'lvol' ansible module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants