ansible-role-server/tasks/telegraf.yml

20 lines
608 B
YAML
Raw Normal View History

---
# 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"
2020-03-08 16:56:50 +00:00
- "telegraf-{{ (override_os_family is defined) | ternary(override_os_family,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:
2019-11-12 20:34:35 +00:00
- Enable and restart telegraf