-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-elk.yml
executable file
·47 lines (45 loc) · 1.05 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
---
- name: Configure Elk VM with Docker
hosts: elk
remote_user: sysadmin
become: true
tasks:
# Use apt module
- name: Install docker.io
apt:
update_cache: yes
name: docker.io
state: present
# Use apt module
- name: Install pip3
apt:
force_apt_get: yes
name: python3-pip
state: present
# Use pip module
- name: Install Docker python module
pip:
name: docker
state: present
# Use sysctl module
- name: Use more memory
sysctl:
name: vm.max_map_count
value: "262144"
state: present
reload: yes
# 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
published_ports:
- 5601:5601
- 9200:9200
- 5044:5044
- name: Enable service docker on boot
systemd:
name: docker
enabled: yes