From 301ff7750173752a766de8ca5ccacf16071ccb46 Mon Sep 17 00:00:00 2001 From: William Wernert Date: Sun, 9 Feb 2020 19:06:54 -0500 Subject: [PATCH] [fix] Jinja2 templating comparisons --- pillar/docker/config.sls | 39 ++++++++++++++++---------------- salt/common/tools/sbin/so-status | 2 +- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/pillar/docker/config.sls b/pillar/docker/config.sls index 2dc592b69..ab2f18d16 100644 --- a/pillar/docker/config.sls +++ b/pillar/docker/config.sls @@ -17,7 +17,7 @@ eval: - so-idstools - so-auth-api - so-auth-ui - {%- if OSQUERY != 0 %} + {%- if OSQUERY != '0' %} - so-mysql - so-fleet - so-redis @@ -30,23 +30,23 @@ eval: - so-zeek - so-curator - so-elastalert - {%- if WAZUH != 0 %} + {%- if WAZUH != '0' %} - so-wazuh {%- endif %} - so-soctopus - {%- if THEHIVE != 0 %} + {%- if THEHIVE != '0' %} - so-thehive - so-thehive-es - so-cortex {%- endif %} - {%- if PLAYBOOK != 0 %} + {%- if PLAYBOOK != '0' %} - so-playbook - so-navigator {%- endif %} - {%- if FREQSERVER != 0 %} + {%- if FREQSERVER != '0' %} - so-freqserver {%- endif %} - {%- if DOMAINSTATS != 0 %} + {%- if DOMAINSTATS != '0' %} - so-domainstats {%- endif %} heavy_node: @@ -107,28 +107,28 @@ master_search: - so-elastalert - so-filebeat - so-soctopus - {%- if OSQUERY != 0 %} + {%- if OSQUERY != '0' %} - so-mysql - so-fleet - so-redis {%- endif %} - {%- if WAZUH != 0 %} + {%- if WAZUH != '0' %} - so-wazuh {%- endif %} - so-soctopus - {%- if THEHIVE != 0 %} + {%- if THEHIVE != '0' %} - so-thehive - so-thehive-es - so-cortex {%- endif %} - {%- if PLAYBOOK != 0 %} + {%- if PLAYBOOK != '0' %} - so-playbook - so-navigator {%- endif %} - {%- if FREQSERVER != 0 %} + {%- if FREQSERVER != '0' %} - so-freqserver {%- endif %} - {%- if DOMAINSTATS != 0 %} + {%- if DOMAINSTATS != '0' %} - so-domainstats {%- endif %} master: @@ -149,28 +149,28 @@ master: - so-kibana - so-elastalert - so-filebeat - {%- if OSQUERY != 0 %} + {%- if OSQUERY != '0' %} - so-mysql - so-fleet - so-redis {%- endif %} - {%- if WAZUH != 0 %} + {%- if WAZUH != '0' %} - so-wazuh {%- endif %} - so-soctopus - {%- if THEHIVE != 0 %} + {%- if THEHIVE != '0' %} - so-thehive - so-thehive-es - so-cortex {%- endif %} - {%- if PLAYBOOK != 0 %} + {%- if PLAYBOOK != '0' %} - so-playbook - so-navigator {%- endif %} - {%- if FREQSERVER != 0 %} + {%- if FREQSERVER != '0' %} - so-freqserver {%- endif %} - {%- if DOMAINSTATS != 0 %} + {%- if DOMAINSTATS != '0' %} - so-domainstats {%- endif %} parser_node: @@ -190,7 +190,7 @@ search_node: - so-elasticsearch - so-curator - so-filebeat - {%- if WAZUH != 0 %} + {%- if WAZUH != '0' %} - so-wazuh {%- endif %} sensor: @@ -213,3 +213,4 @@ warm_node: - so-influxdb - so-grafana - so-elasticsearch + \ No newline at end of file diff --git a/salt/common/tools/sbin/so-status b/salt/common/tools/sbin/so-status index 1527ee4a3..7f6e01eec 100755 --- a/salt/common/tools/sbin/so-status +++ b/salt/common/tools/sbin/so-status @@ -191,7 +191,7 @@ main() { printf "\n" printf "${focus_color}%b\e[0m" "Checking container statuses\n\n" - local num_containers=${#docker_raw_list[@]} + local num_containers=${#container_name_list[@]} for i in $(seq 0 $(($num_containers - 1 ))); do print_line ${container_name_list[$i]} ${container_state_list[$i]}