forked from newrelic/infrastructure-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
log-forwarder.yml
120 lines (99 loc) · 3.27 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
---
- name: log-forwarder-amd64
hosts: amd64
become: true
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("ubuntu16.04") or
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 search("redhat") or
inventory_hostname is search("sles-12.5")
)
- name: repo setup
include_role:
name: repo-setup
when: log_forwader_supported is defined
- name: setup config
include_role:
name: setup-config
vars:
verbose_level: '3'
when: log_forwader_supported is defined
- name: install agent
include_role:
name: agent-install
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
- name: log-forwarder-arm64
hosts: arm64
become: true
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_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: repo setup
include_role:
name: repo-setup
when: log_forwader_supported_arm64 is defined
- name: setup config
include_role:
name: setup-config
vars:
verbose_level: '3'
when: log_forwader_supported_arm64 is defined
- name: install agent
include_role:
name: agent-install
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
always:
- name: Final cleanup # Only required for shared infra.
include_role:
name: cleanup
...