-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathlog-forwarder.yml
184 lines (149 loc) · 5.1 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
---
- 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[78]") 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
- name: log-forwarder-windows
hosts: windows_amd64
gather_facts: yes
pre_tasks:
- name: Initial cleanup # Only required for shared infra.
include_role:
name: cleanup
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
always:
- name: Final cleanup # Only required for shared infra.
include_role:
name: cleanup
...