buluma.influxdb

Ansible Role influxdb

This role installs and configures InfluxDB on RHEL, Debian, and Ubuntu.

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

Example Playbook

This example is from molecule/default/converge.yml and it is tested after each code change, 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

Make sure to prepare your machine first. In CI (Continuous Integration), 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" ))

You can also find a full explanation and example on how to use these roles.

Role Variables

Default values for 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 also use another method to prepare your system.

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 works well with many compatible roles. Visit the documentation for these roles for better understanding.

Here is a chart of related roles:

dependencies

Compatibility

This role has been tested on these container images:

Container Tags
EL all
Ubuntu all
Debian all

Ansible version 2.10 or newer is required. Tests have been performed on:

  • Older versions
  • Latest version
  • Development version

If you encounter any issues, please report them on GitHub.

Changelog

View Role History

License

Apache-2.0

Author Information

Shadow Walker

Informazioni sul progetto

Install and configures InfluDB on Rhel, Debian and Ubuntu

Installa
ansible-galaxy install buluma.influxdb
Licenza
apache-2.0
Download
13k
Proprietario
DevOps Engineer