boutetnico / ansible-role-influxdb Goto Github PK
View Code? Open in Web Editor NEWInstall and configure InfluxDB 2.0 using Ansible.
License: MIT License
Install and configure InfluxDB 2.0 using Ansible.
License: MIT License
Hi :)
wdyt of removing the admin_token in influx setup
here?
ansible-role-influxdb/tasks/configure.yml
Line 18 in ccb1960
An then, add the possibility to configure tokens (including the primary admin token) in a separate task like creating users, buckets, etc.?
ansible-role-influxdb/tasks/configure.yml
Lines 40 to 53 in ccb1960
This would allow us to skip the configuration of a default token and make it optional as not everybody needs a primary admin_token
.
Version 5.0.0 does not work due to InfluxDB signing key URL changing:
TASK [boutetnico.influxdb : Manage InfluxData APT repositories] ****************
failed: [monitoring-instance] (item=deb https://repos.influxdata.com/ubuntu focal stable) => {"ansible_loop_var": "item", "changed": false, "item": "deb https://repos.influxdata.com/ubuntu focal stable", "msg": "Failed to update apt cache: W:GPG error: https://repos.influxdata.com/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY D8FF8E1F7DF8B07E, E:The repository 'https://repos.influxdata.com/ubuntu focal InRelease' is not signed."}
This was fixed in 8fb28b3 but a new release has not been created yet. Is is possible for a new release and version on ansible-galaxy be published? Thanks.
Current fix is to use role directly from github.
Hello,
when using this role configured with TLS like so:
influxdb_config:
tls-cert: "/etc/letsencrypt/live/{{ my_domain }}/fullchain.pem"
tls-key: "/etc/letsencrypt/live/{{ my_domain }}/privkey.pem"
I get an error on the task Ensure InfluxDB is up and running
:
Error: Got 400 from 'http://localhost:8086/health', Attempted to unmarshal error as JSON but failed: invalid character 'C' looking for beginning of value: Client sent an HTTP request to an HTTPS server.
This error will also happen on Set InfluxDB default user, organization, and bucket
when the last one is disabled.
The way I understand it is as follows: as long as the configuration (in /root/.influxdbv2/configs
) with a correct host isn't created, which is done with the influx setup
, the influx
command will use the default host http://localhost:8086/
. That will not work with TLS, because it should be https
and the domain is wrong. The way I found to fix that was to use the --host
argument in those two tasks like so:
- name: Ensure InfluxDB is up and running
command: influx ping \
--host {{ influxdb_host}}
retries: 10
delay: 5
register: _ping
until: _ping.rc == 0
changed_when: false
- name: Set InfluxDB default user, organization, and bucket
command: influx setup \
--org {{ influxdb_primary_org }} \
--bucket {{ influxdb_primary_bucket }} \
--username {{ influxdb_primary_username }} \
--password {{ influxdb_primary_password }} \
--token {{ influxdb_admin_token }} \
--host {{ influxdb_host}} \
--force
register: _setup
failed_when:
- _setup.rc != 0
- '"has already been setup" not in _setup.stdout'
changed_when: _setup.rc == 0
influxdb_host
could be a variable of the role, which is by default set to http://localhost:8086/
Any thoughts on that suggestion?
Greetings Michael
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.