[CODE] add CentOS support to telegraf and cronmails (fix #6)

This commit is contained in:
Jannik Beyerstedt 2020-03-08 16:41:55 +01:00
parent cb289b8fb5
commit 71b3e80227
7 changed files with 88 additions and 30 deletions

View file

@ -1,29 +1,15 @@
---
# Server/Telegraf: Install and Setup Telegraf Monitoring
- name: telegraf - Install apt-transport-https
become: yes
apt:
name: apt-transport-https
state: present
- name: telegraf - Add telegraf repo key
become: yes
apt_key:
url: https://repos.influxdata.com/influxdb.key
state: present
- name: telegraf - Add telegraf repo
become: yes
apt_repository:
repo: "deb https://repos.influxdata.com/debian {{ ansible_distribution_release }} stable"
state: present
# Install
- name: telegraf - Install telegraf
become: yes
apt:
name: telegraf
state: latest
update_cache: yes
cache_valid_time: 3600
include_tasks: "{{ item }}"
with_first_found:
- "telegraf-{{ ansible_distribution }}.{{ ansible_distribution_release }}.yml"
- "telegraf-{{ ansible_distribution }}.yml"
- "telegraf-{{ ansible_os_family }}.yml"
# Configure
- name: telegraf - Copy telegraf config
become: yes
template: