2020-03-08 15:41:55 +00:00
|
|
|
---
|
|
|
|
# Server/Telegraf: Install and Setup Telegraf Monitoring - Debian Version
|
|
|
|
|
|
|
|
- name: telegraf - Install apt-transport-https
|
|
|
|
become: yes
|
2021-08-28 14:50:37 +00:00
|
|
|
ansible.builtin.apt:
|
2020-03-08 15:41:55 +00:00
|
|
|
name: apt-transport-https
|
|
|
|
state: present
|
|
|
|
- name: telegraf - Add telegraf repo key
|
|
|
|
become: yes
|
2021-08-28 14:50:37 +00:00
|
|
|
ansible.builtin.apt_key:
|
2020-03-08 15:41:55 +00:00
|
|
|
url: https://repos.influxdata.com/influxdb.key
|
|
|
|
state: present
|
|
|
|
- name: telegraf - Add telegraf repo
|
|
|
|
become: yes
|
2021-08-28 14:50:37 +00:00
|
|
|
ansible.builtin.apt_repository:
|
2020-03-08 15:41:55 +00:00
|
|
|
repo: "deb https://repos.influxdata.com/debian {{ ansible_distribution_release }} stable"
|
|
|
|
state: present
|
|
|
|
- name: telegraf - Install telegraf
|
|
|
|
become: yes
|
2021-08-28 14:50:37 +00:00
|
|
|
ansible.builtin.apt:
|
2020-03-08 15:41:55 +00:00
|
|
|
name: telegraf
|
|
|
|
state: latest
|
|
|
|
update_cache: yes
|
|
|
|
cache_valid_time: 3600
|
2020-05-22 11:18:45 +00:00
|
|
|
|
|
|
|
# Install SNMP utilities for telegraf monitoring
|
|
|
|
- name: telegraf - Install SNMP utilities
|
2022-02-13 19:52:02 +00:00
|
|
|
when: telegraf_ubnt_ns_ips is defined
|
2020-05-22 11:18:45 +00:00
|
|
|
become: yes
|
2021-08-28 14:50:37 +00:00
|
|
|
ansible.builtin.apt:
|
2020-05-22 11:18:45 +00:00
|
|
|
name: "{{ packages }}"
|
|
|
|
state: present
|
|
|
|
vars:
|
|
|
|
packages:
|
|
|
|
- snmp
|
|
|
|
- snmp-mibs-downloader
|