项目作者: patrickjahns

项目描述 :
🔧 Ansible role for deploying libvirt-prometheus-exporter
高级语言:
项目地址: git://github.com/patrickjahns/ansible-role-libvirt-exporter.git
创建时间: 2019-08-14T19:35:09Z
项目社区:https://github.com/patrickjahns/ansible-role-libvirt-exporter

开源协议:MIT License

下载


libvirt-exporter

Build Status
License
Ansible Role
GitHub tag

A ansible role that installs and configures libvirt-prometheus-exporter as system service

Requirements

None.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

  1. libvirt_exporter_version: 1.0.1

Install a specific version of libvirt-prometheus-exporter. Available versions are listered here.

  1. libvirt_exporter_web_listen_address: "0.0.0.0:9233"

Address and port where the libvirt-prometheus-exporter service will listen on.

  1. libvirt_exporter_uri: "qemu:///system"

The qemu/libvirt connection string - please refer to the official libvirt documentation for possible values

  1. libvirt_exporter_system_group: "libvirt-exp"
  2. 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.

Dependencies

None.

Example Playbook

  1. - hosts: all
  2. roles:
  3. - role: patrickjahns.libvirt_exporter
  4. vars:
  5. libvirt_exporter_system_group: libvirt
  6. libvirt_exporter_system_user: libvirt-exp

Local Testing

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:

  1. pip3 install tox

To run tests on all ansible versions (WARNING: this can take some time)

  1. tox

To run a custom molecule command on custom environment with only default test scenario:

  1. 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.

Travis CI

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.

License

This project is licensed under MIT License. See LICENSE for more details.

Maintainers and Contributors