20 lines
546 B
YAML
20 lines
546 B
YAML
---
|
|
# Server/Telegraf: Install and Setup Telegraf Monitoring
|
|
|
|
# Install
|
|
- name: telegraf - Install telegraf
|
|
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:
|
|
src: "{{ role_path }}/templates/telegraf.conf"
|
|
dest: /etc/telegraf/telegraf.conf
|
|
notify:
|
|
- Enable and restart telegraf
|