Skip to content

Instantly share code, notes, and snippets.

@z3ndrag0n
Created March 24, 2022 01:01
Show Gist options
  • Save z3ndrag0n/7fd0547f0b597143df297a09d52562b6 to your computer and use it in GitHub Desktop.
Save z3ndrag0n/7fd0547f0b597143df297a09d52562b6 to your computer and use it in GitHub Desktop.
---
- name: Config ELK VM with Docker and the Elastic Stack
hosts: elk
become: true
tasks:
- name: docker.io
apt:
update_cache: yes
name: docker.io
state: present
- name: Install pip3
apt:
name: python3-pip
state: present
- name: Install Docker python module
pip:
name: docker
state: present
- name: memory config
sysctl:
name: vm.max_map_count
value: 262144
- name: download and launch a docker elk container
docker_container:
name: dvwa
image: sebp/elk:761
state: started
restart_policy: always
published_ports:
- "5601:5601"
- "9200:9200"
- "5044:5044"
- name: Enable docker service
systemd:
name: docker
enabled: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment