-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Proxy ping healthcheck * Telegraf conditional
- Loading branch information
1 parent
ade15d8
commit 5f3f49c
Showing
6 changed files
with
76 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,4 @@ | ||
--- | ||
- name: "Discover monitor facts" | ||
setup: | ||
delegate_to: '{{item}}' | ||
delegate_facts: yes | ||
when: hostvars[item]["ansible_all_ipv4_addresses"] is not defined | ||
with_items: '{{groups["monitor"]}}' | ||
- name: "Telegraf" | ||
include_tasks: "Telegraf.yml" | ||
when: telegraf is defined | ||
|
||
|
||
- name: "Telegraf config directory" | ||
tags: | ||
- cfg | ||
- telegraf | ||
file: | ||
state: "directory" | ||
path : "{{ item }}" | ||
owner: root | ||
group: root | ||
mode: "0755" | ||
loop: | ||
- /etc/telegraf | ||
- /etc/telegraf/telegraf.d | ||
|
||
|
||
- name: "Telegraf repository" | ||
yum_repository: | ||
name: influxdb | ||
description: InfluxData Repository - Stable | ||
file: influxdb | ||
baseurl: "https://repos.influxdata.com/stable/$basearch/main" | ||
gpgkey: "https://repos.influxdata.com/influxdata-archive_compat.key" | ||
gpgcheck: yes | ||
|
||
|
||
- name: "Install telegraf" | ||
tags: | ||
- pkg | ||
package: | ||
name: "telegraf" | ||
state: "latest" | ||
notify: "Telegraf service restart" | ||
|
||
|
||
- name: "Telegraf configuration" | ||
tags: | ||
- cfg | ||
- telegraf | ||
template: | ||
dest: "/etc/telegraf/telegraf.conf" | ||
src: "telegraf.conf.j2" | ||
notify: "Telegraf service restart" | ||
|
||
|
||
- name: "Services" | ||
include_tasks: "services.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
- name: "Discover monitor facts" | ||
setup: | ||
delegate_to: '{{item}}' | ||
delegate_facts: yes | ||
when: hostvars[item]["ansible_all_ipv4_addresses"] is not defined | ||
with_items: '{{groups["monitor"]}}' | ||
|
||
|
||
- name: "Telegraf config directory" | ||
tags: | ||
- cfg | ||
- telegraf | ||
file: | ||
state: "directory" | ||
path : "{{ item }}" | ||
owner: root | ||
group: root | ||
mode: "0755" | ||
loop: | ||
- /etc/telegraf | ||
- /etc/telegraf/telegraf.d | ||
|
||
|
||
- name: "Telegraf repository" | ||
yum_repository: | ||
name: influxdb | ||
description: InfluxData Repository - Stable | ||
file: influxdb | ||
baseurl: "https://repos.influxdata.com/stable/$basearch/main" | ||
gpgkey: "https://repos.influxdata.com/influxdata-archive_compat.key" | ||
gpgcheck: yes | ||
|
||
|
||
- name: "Install telegraf" | ||
tags: | ||
- pkg | ||
package: | ||
name: "telegraf" | ||
state: "latest" | ||
notify: "Telegraf service restart" | ||
|
||
|
||
- name: "Telegraf configuration" | ||
tags: | ||
- cfg | ||
- telegraf | ||
template: | ||
dest: "/etc/telegraf/telegraf.conf" | ||
src: "telegraf.conf.j2" | ||
notify: "Telegraf service restart" | ||
|
||
|
||
- name: "Services" | ||
include_tasks: "services.yml" |