-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathclusterNewRelicSetup.yml
26 lines (22 loc) · 1.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
---
# Ref: https://github.com/newrelic/nri-zookeeper
# NewRelic Infra Agent should be installed on all zookeeper nodes
- hosts: clusterNodes
become: true
gather_facts: true
vars:
zookeeper_nri_pulgin_version: 1.1
pre_tasks:
- name: checking newrelic infra agent status ( Redhat / CentOS )
ansible.builtin.shell: "set -o pipefail && rpm -qa | grep newrelic-infra"
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
register: isNewRelicInfraInstalledYum
- name: checking newrelic infra agent status ( Ubuntu / Debain )
ansible.builtin.shell: "set -o pipefail && apt search newrelic-infra | grep newrelic-infra"
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
register: isNewRelicInfraInstalledApt
roles:
- role: nri-zookeeper
when:
- isNewRelicInfraInstalledYum != '' or isNewRelicInfraInstalledApt != ''
- isNewRelicInfraInstalledYum is not skipped or isNewRelicInfraInstalledApt is not skipped