All Projects → manala → ansible-role-influxdb

manala / ansible-role-influxdb

Licence: other
[READ-ONLY] Ansible role dealing installation and configuration of InfluxDB time-series database

Programming Languages

Jinja
831 projects
python
139335 projects - #7 most used programming language
Makefile
30231 projects

Ansible Role : InfluxDB Build Status

Report issues and send Pull Requests in the main Ansible Role repository

This role will assume the setup of InfluxDB.

It's part of the Manala Ansible stack but can be used as a stand alone component.

Requirements

This role is made to work with the influxdata influxDB debian packages. Please use the manala.apt role to handle it properly.

manala_apt_preferences:
  - influxdb@influxdata

Dependencies

None.

Supported InfluxDB versions

0.13.0+

Installation

Ansible 2+

Using ansible galaxy cli:

ansible-galaxy install manala.influxdb

Using ansible galaxy requirements file:

- src: manala.influxdb

Role Handlers

Name Type Description
influxdb restart Service Restart influxdb server

Role Variables

Name Default Type Description
manala_influxdb_install_packages ~ Array Dependency packages to install
manala_influxdb_install_packages_default ['influxdb'] Array Default dependency packages to install
manala_influxdb_dir: [] Array Directories used by Influxdb
manala_influxdb_databases [] Array Databases
manala_influxdb_users [] Array Users
manala_influxdb_privileges [] Array Privileges
manala_influxdb_config ~ Array/String Configuration
manala_influxdb_config_file '/etc/influxdb/influxdb.conf' String Configuration file path
manala_influxdb_config_template 'config/base.conf.j2' String Configuration template path

Configuration example

Use influxdata default main config template (recommended):

manala_influxdb_config_template: config/influxdata/influxdb.conf.j2
manala_influxdb_config:
  reporting-disabled: true
  meta:
    dir: /srv/db/influxdb/meta
  http:
    enabled: true
  udp:
    - enabled: true
      bind-address: :8090
      database: app

Use dict parameters:

manala_influxdb_config:
  reporting-disabled: true
  meta:
    dir: /srv/db/influxdb/meta
  http:
    enabled: true
  udp:
    - enabled: true
      bind-address: :8090
      database: app

Use raw config:

manala_influxdb_config: |
  reporting-disabled = true
  [meta]
    dir = "/srv/db/influxdb/meta"
  [http]
    enabled = true
  [[udp]]
    enabled = true
    bind-address = ":8090"
    database = "app"

Use dict's array parameters (deprecated):

manala_influxdb_config:
  - reporting-disabled: true
  - meta:
    - dir: /srv/db/influxdb/meta
  - http:
    - enabled: true
  - udp:
    - enabled: true
    - bind-address: :8090
    - database: app

Databases & Users & Privileges:

manala_influxdb_databases:
  - my_db
manala_influxdb_users:
  - database: my_db
    name: my_user
    password: my_password
manala_influxdb_privileges:
  - database: my_db
    user: my_user
    grant: ALL

See InfluxDB documentation for more information about databases, users and privileges

Example playbook

- hosts: servers
  roles:
    - role: manala.influxdb

Licence

MIT

Author information

Manala (http://www.manala.io/)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].