Created
March 24, 2022 01:01
-
-
Save z3ndrag0n/7fd0547f0b597143df297a09d52562b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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