20 lines
563 B
YAML
20 lines
563 B
YAML
---
|
|
# Application that populates InfluxDB with metric data.
|
|
|
|
- name: Server | Telegraf | Check
|
|
shell: which telegraf
|
|
register: telegraf_check
|
|
ignore_errors: yes
|
|
|
|
- name: Server | Telegraf | Install
|
|
shell: "{{ item }}"
|
|
args:
|
|
chdir: "{{ ansible_env.HOME }}/Downloads/"
|
|
loop:
|
|
- mv telegraf_1.17.3-1_amd64.deb ~/TRASH/ 2>/dev/null; exit 0
|
|
- wget https://dl.influxdata.com/telegraf/releases/telegraf_1.17.3-1_amd64.deb
|
|
- dpkg -i telegraf_1.17.3-1_amd64.deb
|
|
- service telegraf start
|
|
when: telegraf_check.failed
|
|
|
|
# TODO: Add cron job(s) |