From 8583c859187879244a52dfa3f4fcef945b2b90ca Mon Sep 17 00:00:00 2001 From: Thomas Szymanski Date: Tue, 21 Feb 2017 23:08:39 +0100 Subject: [PATCH 1/3] Remove unused vars --- README.md | 1 - defaults/main.yml | 3 --- 2 files changed, 4 deletions(-) diff --git a/README.md b/README.md index 18ae64c..c2eb0f4 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,6 @@ The following parameters can be set for the Telegraf agent: * `telegraf_agent_version`: The version of Telegraf to install. Default: `1.0.0` * `telegraf_agent_rpm_url`: The full path to the RPM file located on a webserver. -* `telegraf_agent_deb_url`: The full path to the DEB file located on a webserver. * `telegraf_agent_interval`: The interval configured for sending data to the server. Default: `10` * `telegraf_agent_debug`: Run Telegraf in debug mode. Default: `False` * `telegraf_agent_round_interval`: Rounds collection interval to 'interval' Default: True diff --git a/defaults/main.yml b/defaults/main.yml index 8dee642..a727460 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,7 +5,6 @@ telegraf_agent_version: 1.0.0 telegraf_agent_hostname: "{{ ansible_fqdn }}" telegraf_agent_version_sub_l: _beta2 -telegraf_agent_version_sub_u: -beta2 telegraf_agent_interval: 10 telegraf_agent_debug: False telegraf_agent_round_interval: True @@ -23,8 +22,6 @@ telegraf_agent_logfile: "" telegraf_agent_omit_hostname: False telegraf_agent_rpm_url: https://dl.influxdata.com/telegraf/releases/telegraf-{{ telegraf_agent_version }}{{ telegraf_agent_version_sub_l }}.x86_64.rpm -telegraf_agent_deb_url: https://dl.influxdata.com/telegraf/releases/telegraf_{{ telegraf_agent_version }}{{ telegraf_agent_version_sub_u }}_amd64.deb - telegraf_agent_tags: telegraf_agent_output: From fd4a8b7d0423326f590e51657760fec7b31ec759 Mon Sep 17 00:00:00 2001 From: Thomas Szymanski Date: Tue, 21 Feb 2017 23:12:07 +0100 Subject: [PATCH 2/3] Use yum repository to install telegraf on RedHat family The role does not use a direct download of the rpm package but use the yum repository for InfluxData products as it is advised in the current documentation for installation. https://docs.influxdata.com/telegraf/v1.2/introduction/installation/ --- README.md | 1 - defaults/main.yml | 2 -- tasks/RedHat.yml | 14 ++++++++------ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index c2eb0f4..4e05403 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,6 @@ Role Variables The following parameters can be set for the Telegraf agent: * `telegraf_agent_version`: The version of Telegraf to install. Default: `1.0.0` -* `telegraf_agent_rpm_url`: The full path to the RPM file located on a webserver. * `telegraf_agent_interval`: The interval configured for sending data to the server. Default: `10` * `telegraf_agent_debug`: Run Telegraf in debug mode. Default: `False` * `telegraf_agent_round_interval`: Rounds collection interval to 'interval' Default: True diff --git a/defaults/main.yml b/defaults/main.yml index a727460..971d0a8 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,7 +4,6 @@ #telegraf_agent_version: 0.10.1 telegraf_agent_version: 1.0.0 telegraf_agent_hostname: "{{ ansible_fqdn }}" -telegraf_agent_version_sub_l: _beta2 telegraf_agent_interval: 10 telegraf_agent_debug: False telegraf_agent_round_interval: True @@ -21,7 +20,6 @@ telegraf_agent_quiet: False telegraf_agent_logfile: "" telegraf_agent_omit_hostname: False -telegraf_agent_rpm_url: https://dl.influxdata.com/telegraf/releases/telegraf-{{ telegraf_agent_version }}{{ telegraf_agent_version_sub_l }}.x86_64.rpm telegraf_agent_tags: telegraf_agent_output: diff --git a/tasks/RedHat.yml b/tasks/RedHat.yml index 9fccbd2..dd209ad 100644 --- a/tasks/RedHat.yml +++ b/tasks/RedHat.yml @@ -25,14 +25,16 @@ - pyopenssl - ndg-httpsclient -- name: "Fetch telegraf installation package | RedHat" - action: get_url - url="{{ telegraf_agent_rpm_url }}" - dest=/tmp/telegraf_{{ telegraf_agent_version }}.x86_64.rpm - mode=0440 +- name: "Add yum repository | RedHat" + yum_repository: + name: influxdb + description: InfluxDB Repository - RHEL $releasever + baseurl: https://repos.influxdata.com/rhel/$releasever/$basearch/stable + gpgcheck: yes + gpgkey: https://repos.influxdata.com/influxdb.key - name: "Install telegraf package | RedHat" action: yum - name=/tmp/telegraf_{{ telegraf_agent_version }}.x86_64.rpm + name="telegraf-{{ telegraf_agent_version }}" state=installed notify: "Restart Telegraf" From b60f95f688fa2386ea6445efa1fab86545911ddc Mon Sep 17 00:00:00 2001 From: Thomas Szymanski Date: Tue, 21 Feb 2017 23:29:33 +0100 Subject: [PATCH 3/3] Fix a typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4e05403..4e25eaf 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ With the property `telegraf_plugins_default` it is set to use the default set of - plugin: swap - plugin: netstat -Every telegraf agent has these as an default configuration. +Every telegraf agent has these as a default configuration. The 2nd parameter `telegraf_plugins_extra` can be used to add plugins specific to the servers goal. Following is an example for using this parameter for MySQL database servers: