ansible-ffrgb/roles/telegraf/tasks/install-redhat.yml

22 lines
641 B
YAML
Raw Normal View History

2021-01-10 19:11:32 +01:00
---
- name: Add InfluxData repository file [RHEL/CentOS]
template:
src: etc/yum.repos.d/influxdata.repo.j2
dest: /etc/yum.repos.d/influxdata.repo
force: yes
backup: yes
when: telegraf_install_url is not defined or telegraf_install_url == None
- name: Install Telegraf packages [RHEL/CentOS]
yum:
name: telegraf
state: latest
update_cache: yes
when: telegraf_install_url is not defined or telegraf_install_url == None
- name: Install Telegraf from URL [RHEL/CentOS]
yum:
name: "{{ telegraf_install_url }}"
state: present
when: telegraf_install_url is defined and telegraf_install_url != None