mirror of
https://github.com/dj-wasabi/ansible-telegraf.git
synced 2025-07-17 08:46:37 +00:00
fix: add missing tasks for RedHat distro (rpm install) (#189)
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
- name: "RedHat | Download Telegraf package (online)"
|
||||
get_url:
|
||||
url: https://dl.influxdata.com/telegraf/releases/{{ telegraf_agent_package_file_rpm }}
|
||||
dest: "{{ telegraf_agent_package }}"
|
||||
dest: "{{ telegraf_agent_package_path }}"
|
||||
use_proxy: "{{ true if http_proxy is defined and http_proxy else false }}"
|
||||
environment:
|
||||
http_proxy: "{{ http_proxy | default(None) | default(omit) }}"
|
||||
@ -35,7 +35,7 @@
|
||||
when:
|
||||
- telegraf_agent_package_method == "online"
|
||||
|
||||
- name: "RedHat | Install Telegraf package"
|
||||
- name: "RedHat | Install Telegraf package (repo)"
|
||||
package:
|
||||
name: "{{ telegraf_agent_package }}"
|
||||
state: "{{ telegraf_agent_package_state }}"
|
||||
@ -44,3 +44,19 @@
|
||||
become: true
|
||||
notify: "Restart Telegraf"
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
when:
|
||||
- telegraf_agent_package_method == "repo"
|
||||
|
||||
|
||||
- name: "RedHat | Install Telegraf package (online)"
|
||||
dnf:
|
||||
name: "{{ telegraf_agent_package_path }}/{{ telegraf_agent_package_file_rpm }}"
|
||||
disable_gpg_check: true
|
||||
state: "{{ telegraf_agent_package_state }}"
|
||||
register: is_telegraf_package_installed
|
||||
until: is_telegraf_package_installed is succeeded
|
||||
become: true
|
||||
notify: "Restart Telegraf"
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
when:
|
||||
- telegraf_agent_package_method == "online"
|
||||
|
Reference in New Issue
Block a user