Premier commit
This commit is contained in:
27
roles/elk/tasks/main.yml
Normal file
27
roles/elk/tasks/main.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
---
|
||||
- name: Création répertoire docker
|
||||
file:
|
||||
path: /root/elk
|
||||
state: directory
|
||||
|
||||
- name: Vérification d'ELK
|
||||
stat:
|
||||
path: /root/elk/docker-compose.yml
|
||||
register: elk
|
||||
|
||||
- name: Installation d'ELK
|
||||
ansible.builtin.git:
|
||||
repo: https://github.com/deviantony/docker-elk.git
|
||||
dest: /root/elk/
|
||||
when: not elk.stat.exists
|
||||
|
||||
- name: Configuration d'ELK
|
||||
replace:
|
||||
path: /root/elk/elasticsearch/config/elasticsearch.yml
|
||||
regexp: 'xpack.license.self_generated.type: trial'
|
||||
replace: 'xpack.license.self_generated.type: basic'
|
||||
|
||||
- name: Execution du fichier docker-compose.yml
|
||||
shell: docker-compose up -d
|
||||
args:
|
||||
chdir: /root/elk
|
Reference in New Issue
Block a user