env-ansible/tasks/server/influxdb.yml

20 lines
669 B
YAML
Raw Normal View History

---
# Application that populates InfluxDB with metric data.
- name: Server | InfluxDB | Check
shell: which influxd
register: influxdb_check
ignore_errors: yes
2021-03-16 19:54:36 -05:00
- name: Server | InfluxDB | Install
shell: "{{ item }}"
args:
chdir: "{{ ansible_env.HOME }}/Downloads/"
loop:
- mv influxdb2-2.0.4-amd64.deb ~/TRASH/ 2>/dev/null; exit 0
- mv influxdb_1.8.4_amd64.deb ~/TRASH/ 2>/dev/null; exit 0
- wget https://dl.influxdata.com/influxdb/releases/influxdb_1.8.4_amd64.deb
- sudo dpkg -i influxdb_1.8.4_amd64.deb
- service influxdb start
- influx setup -f -u ling -p initpassword -o Hyperling -b main -r 0
when: influxdb_check.failed