boutetnico.influxdb

ansible-role-influxdb

This is a role that helps you install and set up InfluxDB.

Requirements

You need Ansible version 2.10 or newer.

Supported Platforms

Role Variables

Here's a table of the settings you can customize:

Variable Required Default Choices Comments
influxdb_dependencies yes [apt-transport-https,curl,gnupg] list
influxdb_package_state yes present string Use latest to upgrade.
influxdb_host yes http://localhost:8086 string
influxdb_config_path yes /etc/influxdb string
influxdb_bolt_path yes /var/lib/influxdb/influxd.bolt string
influxdb_engine_path yes /var/lib/influxdb/engine string
influxdb_config yes {} dict Main configuration object.
influxdb_primary_org yes example-org string Name of the main organization.
influxdb_primary_bucket yes example-bucket string Name of the main bucket.
influxdb_primary_username yes example-user string Name of the main user.
influxdb_primary_password yes ExAmPl3PA55W0rD string Password for the main user.
influxdb_admin_token yes EXAMPLE-TOKEN string Token for the admin user.
influxdb_orgs yes [] list Additional organizations to create.
influxdb_users yes [] list Additional users to create.
influxdb_buckets yes [] list Additional buckets to create.
influxdb_service_enabled yes true bool Start InfluxDB when you boot your system.
influxdb_service_state yes started bool Use started or stopped.

Dependencies

There are no dependencies.

Example Playbook

Here’s how you can use this role in your playbook:

- hosts: all
  roles:
    - role: ansible-role-influxdb

      influxdb_orgs:
        - name: main-org
          description: Main organization
        - name: guest-org

      influxdb_users:
        - name: admin01
          org: main-org
          password: secretPassword
        - name: guest01
          org: guest-org
          password: secretPassword

      influxdb_buckets:
        - name: bucket01
          description: First bucket
          org: main-org
          retention: 1d
        - name: bucket02
          org: main-org

Testing

Run the following command to test:

molecule test --all

License

This project is licensed under the MIT License.

Author Information

Created by @boutetnico.

Informazioni sul progetto

Install and configure InfluxDB.

Installa
ansible-galaxy install boutetnico.influxdb
Licenza
mit
Download
5.2k
Proprietario
System Engineer