forked from feli5/ocp-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path11_elk.yml
47 lines (38 loc) · 795 Bytes
/
11_elk.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
---
- hosts: all
tasks:
- name: Build hosts file
lineinfile: dest=/etc/hosts regexp='.*{{ item }}$' line="{{ hostvars[item].ansible_eth0.ipv4.address }} {{ item }}.{{ domainname }} {{ item }}" state=present
when: hostvars[item].ansible_eth0.ipv4.address is defined
with_items: groups['all']
# if elasticsearch is vm, we need common_vm
- hosts: elasticsearch
roles:
- common_vm
- common
- hosts: logstash
roles:
- common_vm
- common
- hosts: kibana
roles:
- common_vm
- common
- hosts: elasticsearch
roles:
- elasticsearch
- hosts: logstash
roles:
- logstash
- hosts: kibana
roles:
- kibana
- hosts: controller
roles:
- logstash-forwarder
- hosts: network
roles:
- logstash-forwarder
- hosts: compute
roles:
- logstash-forwarder