Add check to telegraf as well.
This commit is contained in:
parent
01de6dda1e
commit
fe1f2b7387
@ -1,10 +1,18 @@
|
|||||||
---
|
---
|
||||||
# Application that populates InfluxDB with metric data.
|
# Application that populates InfluxDB with metric data.
|
||||||
|
|
||||||
|
- name: Server | Telegraf | Check
|
||||||
|
shell: which telegraf
|
||||||
|
register: telegraf_check
|
||||||
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Server | Telegraf | Install
|
- name: Server | Telegraf | Install
|
||||||
shell: "{{ item }}"
|
shell: "{{ item }}"
|
||||||
args:
|
args:
|
||||||
chdir: "{{ ansible_env.HOME }}/Downloads/"
|
chdir: "{{ ansible_env.HOME }}/Downloads/"
|
||||||
loop:
|
loop:
|
||||||
|
- mv telegraf_1.17.3-1_amd64.deb ~/TRASH/ 2>/dev/null
|
||||||
- wget https://dl.influxdata.com/telegraf/releases/telegraf_1.17.3-1_amd64.deb
|
- wget https://dl.influxdata.com/telegraf/releases/telegraf_1.17.3-1_amd64.deb
|
||||||
- dpkg -i telegraf_1.17.3-1_amd64.deb
|
- dpkg -i telegraf_1.17.3-1_amd64.deb
|
||||||
|
- service telegraf start
|
||||||
|
when: telegraf_check.failed
|
Loading…
x
Reference in New Issue
Block a user