forked from newrelic/infrastructure-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog-forwarder.yml
142 lines (116 loc) · 4.02 KB
/
log-forwarder.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
---
- name: log-forwarder-amd64
hosts: linux_amd64
become: true
gather_facts: yes
pre_tasks:
- name: Initial cleanup
include_role:
name: caos.ansible_roles.infra_agent
vars:
uninstall: true
tasks:
- name: Log forwarder tests suite
vars:
env_vars:
block:
- name: Define variable with supported versions
set_fact:
log_forwader_supported: true
when: (
inventory_hostname is search("ubuntu18.04") or
inventory_hostname is search("ubuntu20.04") or
inventory_hostname is search("debian-stretch") or
inventory_hostname is search("debian-jessie") or
inventory_hostname is search("debian-buster") or
inventory_hostname is search("centos") or
inventory_hostname is regex("redhat-[78]")
)
# TODO :point-up: There is no FB pkg for RH9 yet
# TODO :point-down: systemd plugin is not enabled in sles FB. Disabled until clarify this.
# inventory_hostname is search("sles-12")
# inventory_hostname is search("sles-15")
- name: install agent
include_role:
name: caos.ansible_roles.infra_agent
vars:
log_level: 'debug'
log_forward: 'true'
repo_endpoint: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"
when: log_forwader_supported is defined
# Not available for ARM yet
- name: Log forwarder
include_role:
name: logging
when: log_forwader_supported is defined
- name: log-forwarder-arm64
hosts: linux_arm64
become: true
gather_facts: yes
pre_tasks:
- name: Initial cleanup
include_role:
name: caos.ansible_roles.infra_agent
vars:
uninstall: true
tasks:
- name: Log forwarder tests suite
vars:
env_vars:
block:
- name: Define variable with supported versions
set_fact:
log_forwader_supported_arm64: true
when: (
inventory_hostname is search("ubuntu18.04") or
inventory_hostname is search("ubuntu20.04") or
inventory_hostname is search("debian-stretch") or
inventory_hostname is search("debian-jessie") or
inventory_hostname is search("debian-buster") or
inventory_hostname is search("centos7")
)
- name: install agent
include_role:
name: caos.ansible_roles.infra_agent
vars:
log_level: 'debug'
log_forward: 'true'
repo_endpoint: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"
when: log_forwader_supported_arm64 is defined
# Not available for ARM yet
- name: Log forwarder
include_role:
name: logging
when: log_forwader_supported_arm64 is defined
- name: log-forwarder-windows
hosts: windows_amd64
gather_facts: yes
pre_tasks:
- name: Initial cleanup
include_role:
name: caos.ansible_roles.infra_agent
vars:
uninstall: true
tasks:
- name: Log forwarder tests suite
vars:
env_vars:
block:
- name: Define variable with supported versions
set_fact:
log_forwader_supported: true
when: inventory_hostname is search("windows")
- name: install agent
include_role:
name: caos.ansible_roles.infra_agent
vars:
log_level: 'debug'
log_forward: 'true'
repo_endpoint: "http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent"
when: log_forwader_supported is defined
# Not available for ARM yet
- name: Log forwarder
include_role:
name: logging
when: log_forwader_supported is defined
...