-
Notifications
You must be signed in to change notification settings - Fork 25
/
clusterNewRelicSetup.yml
49 lines (42 loc) · 2.03 KB
/
clusterNewRelicSetup.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
# Notes:
# New version of integration can be downloaded from below link
# Redhat / CentOS: https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64
# Ubuntu / Debain: https://download.newrelic.com/infrastructure_agent/linux/apt/pool/main/n/
# NewRelic Integration should be installed on all broker nodes
- hosts: clusterNodes:clusterAddNodes
become: true
gather_facts: true
pre_tasks:
- name: checking newrelic infra agent status ( Redhat / CentOS )
ansible.builtin.shell: "set -o pipefail && rpm -qa | grep newrelic-infra"
when: ansible_distribution in ['CentOS', 'RedHat'] | list
register: isNewRelicInfraInstalledYum
- name: checking newrelic infra agent status ( Ubuntu / Debain )
ansible.builtin.shell: "set -o pipefail && apt list --installed | grep -i newrelic-infra"
when: ansible_distribution in ['Debian', 'Ubuntu'] | list
register: isNewRelicInfraInstalledApt
roles:
- role: nri-kafka
when:
- isNewRelicInfraInstalledYum != '' or isNewRelicInfraInstalledApt != ''
- isNewRelicInfraInstalledYum is not skipped or isNewRelicInfraInstalledApt is not skipped
- hosts: kafka-mirror-maker
become: true
gather_facts: true
pre_tasks:
- name: checking newrelic infra agent status ( Redhat / CentOS )
ansible.builtin.shell: "set -o pipefail && rpm -qa | grep newrelic-infra"
when: ansible_distribution in ['CentOS', 'RedHat'] | list
register: isNewRelicInfraInstalledYum
- name: checking newrelic infra agent status ( Ubuntu / Debain )
ansible.builtin.shell: "set -o pipefail && apt list --installed | grep -i newrelic-infra"
when: ansible_distribution in ['Debian', 'Ubuntu'] | list
register: isNewRelicInfraInstalledApt
tasks:
- ansible.builtin.include_role:
name: nri-kafka
tasks_from: kafka-mirror-maker.yml
when:
- isNewRelicInfraInstalledYum != '' or isNewRelicInfraInstalledApt != ''
- isNewRelicInfraInstalledYum is not skipped or isNewRelicInfraInstalledApt is not skipped