Repository navigation
Add virtualization role - #145
Merged
Merged
Conversation
pymnh
force-pushed
the
pymnh/libvirt
branch
6 times, most recently
from
October 29, 2026 15:39
ee1e1ea to
f372238
Compare
pymnh
force-pushed
the
pymnh/libvirt
branch
2 times, most recently
from
November 16, 2026 16:20
0dc4a3d to
3a570b3
Compare
pymnh
force-pushed
the
pymnh/libvirt
branch
2 times, most recently
from
November 23, 2026 18:04
16af5d0 to
1898787
Compare
pymnh
marked this pull request as ready for review
November 23, 2026 18:05
pymnh
marked this pull request as draft
November 24, 2026 16:38
pymnh
force-pushed
the
pymnh/libvirt
branch
3 times, most recently
from
November 26, 2026 16:03
5942093 to
0e90792
Compare
pymnh
marked this pull request as ready for review
November 26, 2026 16:10
pymnh
force-pushed
the
pymnh/libvirt
branch
3 times, most recently
from
November 30, 2026 10:37
335ca9a to
e40451d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See
roles/virt/README.mdon how to test the role.Tasks for installation and configuration of prometheus-libvirt-exporter are split into their role at
roles/prometheus_libvirt_exporterto reduce complexity, and because the latter can easily be tested with molecule, while testing the virtualization inside podman containers does not make any sense. Molecule testing is not yet included, because I want to avoid merge conflicts with #117Right now the tasks for setting up the host/libvirt and tasks for provisioning the guests are folded up inside
roles/virt. the entry point for guest provisioning isroles/virt/tasks/guests.ymlwhich in turn dynamically (i.e. based on the content of the variablesvirt_guestsandvirt_guests_delete) loops over the various tasks inroles/virt/tasks/guest/.For each guest item in the loop, arguments are validated in
roles/virt/tasks/guest/preflight.yml, which is a bit awkward as it might fail unexpectedly at runtime. It might make sense to split out the guest-specific tasks into a single, re-usable role, with a "proper", role-level argument validation, but maybe that is premature optimization, therefore I have left it as is for nowthe new role introduces a new variable convention for internal and public interfaces, because the old schema (
host_data.site_ipv4,host_data.global_ipv4) was not well suited (working with dicts variables in ansible is cumbersome, so if you have to, their structure should be well suited for their usage) and because the naming schemehost_datadoes not adhere to ansible best practices. I will align the host_data to the "new" variable convention in another PR :)