-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-ELK.yml
51 lines (45 loc) · 1.16 KB
/
install-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
48
49
50
51
---
- name: Configure Elk VM with Docker
hosts: elk
remote_user: azadmin
become: true
tasks:
# Use apt module
- name: Install docker.io
apt:
update_cache: yes
force_apt_get: yes
name: docker.io
state: present
# Use apt module
- name: Install python3-pip
apt:
force_apt_get: yes
name: python3-pip
state: present
# Use pip module (It will default to pip3)
- name: Install Docker module
pip:
name: docker
state: present
# Use command module
- name: Increase virtual memory
command: sysctl -w vm.max_map_count=262144
# Use docker_container module
- name: download and launch a docker elk container
docker_container:
name: elk
image: sebp/elk:761
state: started
restart_policy: always
# Please list the ports that ELK runs on
published_ports:
ports:
- 10.2.0.4:5601:5601
- 10.2.0.4:9200:9200
- 10.2.0.4:5044:5044
# Use systemd module
- name: Enable service docker on boot
systemd:
name: docker
enabled: yes