-
Notifications
You must be signed in to change notification settings - Fork 0
/
elk-playbook.yml.txt
37 lines (37 loc) · 1.32 KB
/
elk-playbook.yml.txt
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
---
- name: Configure Elk VM with Docker
hosts: elkservers
remote_user: sysadmin
become: true
tasks:
# Use apt module
- name: Install docker.io
apt:
force_apt_get: yes
name: docker.io
state: present
# Use apt module
- name: Install python-pip
Apt:
force_apt_get: yes
name: python-pip
state: present
# Use pip module
- 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
state: started
# Please list the ports that ELK runs on
published_ports:
- 9200:9200
- 5601:5601
- 5044:5044