A ansible role that installs and configures libvirt-prometheus-exporter as system service
None.
Available variables are listed below, along with default values (see defaults/main.yml
):
libvirt_exporter_version: 1.0.1
Install a specific version of libvirt-prometheus-exporter. Available versions are listered here.
libvirt_exporter_web_listen_address: "0.0.0.0:9233"
Address and port where the libvirt-prometheus-exporter service will listen on.
libvirt_exporter_uri: "qemu:///system"
The qemu/libvirt connection string - please refer to the official libvirt documentation for possible values
libvirt_exporter_system_group: "libvirt-exp"
libvirt_exporter_system_user: "{{ libvirt_exporter_system_group }}"
The user and group for the service. Please ensure that this group has access to libvirt socket if a local socket is used.
None.
- hosts: all
roles:
- role: patrickjahns.libvirt_exporter
vars:
libvirt_exporter_system_group: libvirt
libvirt_exporter_system_user: libvirt-exp
The preferred way of locally testing the role is to use Docker and molecule (v3.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable to for your system. We are using tox to simplify process of testing on multiple ansible versions. To install tox execute:
pip3 install tox
To run tests on all ansible versions (WARNING: this can take some time)
tox
To run a custom molecule command on custom environment with only default test scenario:
tox -e ansible29 -- molecule test -s default
For more information about molecule go to their docs.
If you would like to run tests on remote docker host just specify DOCKER_HOST
variable before running tox tests.
Combining molecule and travis CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which will take more time than local testing, so please be patient.
This project is licensed under MIT License. See LICENSE for more details.