ansible/roles/telegraf/tasks/install-redhat.yml
Bastian Mäuser 755c1c5af1
Some checks failed
continuous-integration/drone/push Build is failing
Add Telegraf Role
2021-01-10 19:11:32 +01:00

22 lines
641 B
YAML

---
- 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