Files
env-ansible/tasks/server/software/influxdb2.yml
T
2026-10-02 11:16:42 -07:00

26 lines
826 B
YAML

---
# Create an Influx2.0 DB. Have not successfully used in Grafana yet.
# https://docs.influxdata.com/influxdb/v2.0/get-started/?t=Linux
- name: Server | InfluxDB2 | Check
ansible.builtin.shell: which influxd
register: influxdb_check
ignore_errors: true
- name: Server | InfluxDB2 | Install
ansible.builtin.shell: "{{ item }}"
args:
chdir: "{{ ansible_env.HOME }}/Downloads/"
loop:
- mv influxdb2-2.0.4-amd64.deb ~/TRASH/ 2>/dev/null; exit 0
- wget https://dl.influxdata.com/influxdb/releases/influxdb2-2.0.4-amd64.deb
- sudo dpkg -i influxdb2-2.0.4-amd64.deb
- service influxdb start
- sleep 10
when: influxdb_check.failed
- name: Server | InfluxDB2 | Config
ansible.builtin.shell: "{{ item }}"
loop:
- influx setup -f -u {{ user }} -p initpassword -o Hyperling -b main -r 0