mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
use onlyif requisite instead
This commit is contained in:
@@ -107,10 +107,6 @@ wait_for_elasticsearch:
|
|||||||
cmd.run:
|
cmd.run:
|
||||||
- name: so-elasticsearch-wait
|
- name: so-elasticsearch-wait
|
||||||
|
|
||||||
is_elasticsearch_v8:
|
|
||||||
cmd.shell:
|
|
||||||
- name: "so-elasticsearch-query / | jq -r '.version.number[0:1]' | grep -q 8" #if not 8 do not start ES
|
|
||||||
|
|
||||||
so-elastalert:
|
so-elastalert:
|
||||||
docker_container.running:
|
docker_container.running:
|
||||||
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-elastalert:{{ VERSION }}
|
- image: {{ MANAGER }}:5000/{{ IMAGEREPO }}/so-elastalert:{{ VERSION }}
|
||||||
@@ -127,13 +123,15 @@ so-elastalert:
|
|||||||
- {{MANAGER_URL}}:{{MANAGER_IP}}
|
- {{MANAGER_URL}}:{{MANAGER_IP}}
|
||||||
- require:
|
- require:
|
||||||
- cmd: wait_for_elasticsearch
|
- cmd: wait_for_elasticsearch
|
||||||
- cmd: is_elasticsearch_v8
|
|
||||||
- file: elastarules
|
- file: elastarules
|
||||||
- file: elastalogdir
|
- file: elastalogdir
|
||||||
- file: elastacustmodulesdir
|
- file: elastacustmodulesdir
|
||||||
- file: elastaconf
|
- file: elastaconf
|
||||||
- watch:
|
- watch:
|
||||||
- file: elastaconf
|
- file: elastaconf
|
||||||
|
- onlyif:
|
||||||
|
- "so-elasticsearch-query / | jq -r '.version.number[0:1]' | grep -q 8" {# only run this state if elasticsearch is version 8 #}
|
||||||
|
|
||||||
|
|
||||||
append_so-elastalert_so-status.conf:
|
append_so-elastalert_so-status.conf:
|
||||||
file.append:
|
file.append:
|
||||||
|
|||||||
Reference in New Issue
Block a user