openvpn_exporter

ansible-role-openvpn-exporter

Test License Ansible Role GitHub tag

Description

Deploy openvpn_exporter using ansible. For recent changes, please check the CHANGELOG or have a look at github releases

Requirements

  • Ansible >= 2.7

Role Variables

All variables which can be overridden are stored in defaults/main.yml file as well as in table below.

Name Default Value Description
openvpn_exporter_version 1.1.2 The version of the openvpn_eporter to install
openvpn_exporter_system_user openvpn_exporter User that openvpn_exporter will run as
openvpn_exporter_system_group openvpn_exporter Groups the openvpn_exporter user belongs to
openvpn_exporter_user_additional_groups "" Additional groups the openvpn_exporter user should belong to (i.e. openvpn)
openvpn_exporter_install_dir /opt/openvpn_exporter Directory in wich openvpn_exporter will be installed
openvpn_exporter_config_web_address "" see openvpn_exporter
openvpn_exporter_config_web_path "" see openvpn_exporter
openvpn_exporter_config_web_root "" see openvpn_exporter
openvpn_exporter_disable_client_metrics False see openvpn_exporter
openvpn_exporter_config_enable_golang_metrics False see openvpn_exporter
openvpn_exporter_config_log_level "info" see openvpn_exporter
openvpn_exporter_config_status_files [] Path(s) to the status files - see openvpn_exporter

Example Playbook

---
- hosts: all
  roles:
    - role: patrickjahns.openvpn_exporter
      vars:
        openvpn_exporter_config_status_files:
          - /etc/openvpn/server1.status
          - servername:/etc/openvpn/server2.status

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:

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.

CI

Github actions is used to test and validate this ansible role via ansible-later and molecule. 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. Molecule tests will run with several operation systems as well as ansible version in order to ensure compatability.

License

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

Maintainers and Contributors

Install
ansible-galaxy install patrickjahns/ansible-role-openvpn-exporter
GitHub repository
License
mit
Downloads
79354
Owner
Site Reliability Engineer with a ❤️ for "everything as code". Passionate about software craftsmanship and deliberately breaking things (aka Chaos Engineering)