influxdb

Ansible role influxdb

Install and configures InfluDB on Rhel, Debian and Ubuntu

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

This example is taken from molecule/default/converge.yml and is tested on each push, pull request and release.

---
- name: Converge
  hosts: all
  vars:
    influxdb_admin_username: admin
    influxdb_admin_password: admin123
    influxdb_databases:
      - name: telegraf-metrics
        state: present
    influxdb_users:
      - name: telegraf
        password: telegraf
        grants:
          - database: telegraf-metrics
            privilege: "WRITE"
  roles:
    - role: buluma.influxdb

The machine needs to be prepared. In CI this is done using molecule/default/prepare.yml:

---
- name: Prepare container
  hosts: all
  gather_facts: true
  roles:
    - role: buluma.bootstrap
    - role: buluma.epel
    # - role: buluma.buildtools
    # - role: buluma.ca_certificates

  tasks:
    - name: install python-pip on RHEL7
      yum:
        name: python-pip
        state: present
      when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "7"

    - name: install python3-pip on RHEL8
      yum:
        name: python3
        state: present
      when: ansible_os_family == "RedHat" and ansible_distribution_major_version == "8"

    - name: apt install pip on Ubuntu
      apt:
        name: "{{ item }}"
        update_cache: yes
        state: present
      loop:
        - python3-pip
        - python3-setuptools
        - gnupg
      when: ( ansible_os_family == "Debian" and ansible_distribution == "Ubuntu" )

    - name: install pip on Debian
      apt:
        name: "{{ item }}"
        state: present
        update_cache: true
      loop:
        - gnupg
        - python-setuptools
        - python-pip
      when: ( ansible_os_family == "Debian" and ( ansible_distribution_major_version == "10" or ansible_distribution_major_version == "9" ))

Also see a full explanation and example on how to use these roles.

Role Variables

The default values for the variables are set in defaults/main.yml:

---
influxdb_manage_repository: yes
influxdb_manage_package: yes
influxdb_config_dir: /etc/influxdb
influxdb_config_global:
    reporting-disabled: false
    bind-address: 127.0.0.1:8088
influxdb_config_graphite:
    - enabled: false
      tags:
          - region=us
          - zone=test
influxdb_config_collectd:
    - enabled: false
influxdb_config_udp:
    - enabled: false
influxdb_config_meta:
    dir: /var/lib/influxdb/meta
    retention-autocreate: true
    logging-enabled: true
influxdb_config_http:
    enabled: true
    https-enabled: false
    bind-address: 127.0.0.1:8086
    auth-enabled: true
    ping-auth-enabled: true
influxdb_config_data:
    dir: /var/lib/influxdb/data
    wal-dir: /var/lib/influxdb/wal
    series-id-set-cache-size: 100
influxdb_admin_username: admin
influxdb_admin_password: admin

Requirements

State of used roles

The following roles are used to prepare a system. You can prepare your system in another way.

Requirement GitHub Version
buluma.bootstrap Ansible Molecule Version
buluma.epel Ansible Molecule Version
buluma.buildtools Ansible Molecule Version
buluma.ca_certificates Ansible Molecule Version

Context

This role is a part of many compatible roles. Have a look at the documentation of these roles for further information.

Here is an overview of related roles:

dependencies

Compatibility

This role has been tested on these container images:

container tags
EL all
Ubuntu all
Debian all

The minimum version of Ansible required is 2.10, tests have been done to:

  • The previous version.
  • The current version.
  • The development version.

If you find issues, please register them in GitHub

Changelog

Role History

License

Apache-2.0

Author Information

Shadow Walker

Install
ansible-galaxy install buluma/ansible-role-influxdb
GitHub repository
License
apache-2.0
Downloads
12996
Owner
DevOps Engineer