From 3482df5ee1e736f9a7efb7d128cde4660490817a Mon Sep 17 00:00:00 2001 From: doug Date: Wed, 4 Jan 2023 13:33:51 -0500 Subject: [PATCH] fix jinja whitespace --- salt/common/tools/sbin/so-elastic-clear | 2 +- .../tools/sbin/so-elasticsearch-component-templates-list | 2 +- .../tools/sbin/so-elasticsearch-index-templates-list | 2 +- salt/common/tools/sbin/so-elasticsearch-indices-list | 2 +- salt/common/tools/sbin/so-elasticsearch-pipeline-stats | 2 +- salt/common/tools/sbin/so-elasticsearch-pipeline-view | 2 +- salt/common/tools/sbin/so-elasticsearch-pipelines-list | 2 +- salt/common/tools/sbin/so-elasticsearch-shards-list | 2 +- salt/common/tools/sbin/so-elasticsearch-template-remove | 2 +- salt/common/tools/sbin/so-elasticsearch-template-view | 2 +- salt/common/tools/sbin/so-elasticsearch-templates-list | 2 +- salt/common/tools/sbin/so-import-evtx | 6 +++--- salt/common/tools/sbin/so-import-pcap | 2 +- salt/common/tools/sbin/so-kibana-config-export | 9 ++++----- 14 files changed, 19 insertions(+), 20 deletions(-) diff --git a/salt/common/tools/sbin/so-elastic-clear b/salt/common/tools/sbin/so-elastic-clear index 8c12e622c..283e3c75e 100755 --- a/salt/common/tools/sbin/so-elastic-clear +++ b/salt/common/tools/sbin/so-elastic-clear @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common SKIP=0 diff --git a/salt/common/tools/sbin/so-elasticsearch-component-templates-list b/salt/common/tools/sbin/so-elasticsearch-component-templates-list index 2d70bac7e..c5162be64 100755 --- a/salt/common/tools/sbin/so-elasticsearch-component-templates-list +++ b/salt/common/tools/sbin/so-elasticsearch-component-templates-list @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common if [ "$1" == "" ]; then {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_component_template | jq '.component_templates[] |.name'| sort diff --git a/salt/common/tools/sbin/so-elasticsearch-index-templates-list b/salt/common/tools/sbin/so-elasticsearch-index-templates-list index 10b54088c..ed2d82e38 100755 --- a/salt/common/tools/sbin/so-elasticsearch-index-templates-list +++ b/salt/common/tools/sbin/so-elasticsearch-index-templates-list @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common if [ "$1" == "" ]; then {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_index_template | jq '.index_templates[] |.name'| sort diff --git a/salt/common/tools/sbin/so-elasticsearch-indices-list b/salt/common/tools/sbin/so-elasticsearch-indices-list index 0bd6950e7..4210625e8 100755 --- a/salt/common/tools/sbin/so-elasticsearch-indices-list +++ b/salt/common/tools/sbin/so-elasticsearch-indices-list @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-elasticsearch-pipeline-stats b/salt/common/tools/sbin/so-elasticsearch-pipeline-stats index bd32cb18a..0cd245a63 100755 --- a/salt/common/tools/sbin/so-elasticsearch-pipeline-stats +++ b/salt/common/tools/sbin/so-elasticsearch-pipeline-stats @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-elasticsearch-pipeline-view b/salt/common/tools/sbin/so-elasticsearch-pipeline-view index f6ba71428..9cbb1ef09 100755 --- a/salt/common/tools/sbin/so-elasticsearch-pipeline-view +++ b/salt/common/tools/sbin/so-elasticsearch-pipeline-view @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-elasticsearch-pipelines-list b/salt/common/tools/sbin/so-elasticsearch-pipelines-list index d82760999..3f507aaf5 100755 --- a/salt/common/tools/sbin/so-elasticsearch-pipelines-list +++ b/salt/common/tools/sbin/so-elasticsearch-pipelines-list @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common if [ "$1" == "" ]; then {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_ingest/pipeline/* | jq 'keys' diff --git a/salt/common/tools/sbin/so-elasticsearch-shards-list b/salt/common/tools/sbin/so-elasticsearch-shards-list index 12244a6ee..aa767b190 100755 --- a/salt/common/tools/sbin/so-elasticsearch-shards-list +++ b/salt/common/tools/sbin/so-elasticsearch-shards-list @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-elasticsearch-template-remove b/salt/common/tools/sbin/so-elasticsearch-template-remove index 3e96cba90..2d96be69c 100755 --- a/salt/common/tools/sbin/so-elasticsearch-template-remove +++ b/salt/common/tools/sbin/so-elasticsearch-template-remove @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-elasticsearch-template-view b/salt/common/tools/sbin/so-elasticsearch-template-view index 5ed80b539..12c66bc5c 100755 --- a/salt/common/tools/sbin/so-elasticsearch-template-view +++ b/salt/common/tools/sbin/so-elasticsearch-template-view @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-elasticsearch-templates-list b/salt/common/tools/sbin/so-elasticsearch-templates-list index d3f662dea..ee8285ae3 100755 --- a/salt/common/tools/sbin/so-elasticsearch-templates-list +++ b/salt/common/tools/sbin/so-elasticsearch-templates-list @@ -14,7 +14,7 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . -{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') -%} +{%- set NODEIP = salt['pillar.get']('elasticsearch:mainip', '') %} . /usr/sbin/so-common if [ "$1" == "" ]; then {{ ELASTICCURL }} -s -k -L https://{{ NODEIP }}:9200/_template/* | jq 'keys' diff --git a/salt/common/tools/sbin/so-import-evtx b/salt/common/tools/sbin/so-import-evtx index 9e8eb1c13..ef91cf346 100755 --- a/salt/common/tools/sbin/so-import-evtx +++ b/salt/common/tools/sbin/so-import-evtx @@ -18,10 +18,10 @@ {%- set MANAGER = salt['grains.get']('master') %} {%- set VERSION = salt['pillar.get']('global:soversion') %} {%- set IMAGEREPO = salt['pillar.get']('global:imagerepo') %} -{%- set MANAGERIP = salt['pillar.get']('global:managerip') -%} +{%- set MANAGERIP = salt['pillar.get']('global:managerip') %} {%- set URLBASE = salt['pillar.get']('global:url_base') %} -{% set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:user', '') %} -{% set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:pass', '') %} +{%- set ES_USER = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:user', '') %} +{%- set ES_PASS = salt['pillar.get']('elasticsearch:auth:users:so_elastic_user:pass', '') %} INDEX_DATE=$(date +'%Y.%m.%d') RUNID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 8 | head -n 1) diff --git a/salt/common/tools/sbin/so-import-pcap b/salt/common/tools/sbin/so-import-pcap index 9a1efd7ed..01fa3ae72 100755 --- a/salt/common/tools/sbin/so-import-pcap +++ b/salt/common/tools/sbin/so-import-pcap @@ -18,7 +18,7 @@ {%- set MANAGER = salt['grains.get']('master') %} {%- set VERSION = salt['pillar.get']('global:soversion') %} {%- set IMAGEREPO = salt['pillar.get']('global:imagerepo') %} -{%- set MANAGERIP = salt['pillar.get']('global:managerip') -%} +{%- set MANAGERIP = salt['pillar.get']('global:managerip') %} {%- set URLBASE = salt['pillar.get']('global:url_base') %} . /usr/sbin/so-common diff --git a/salt/common/tools/sbin/so-kibana-config-export b/salt/common/tools/sbin/so-kibana-config-export index 94974b642..14f169d89 100755 --- a/salt/common/tools/sbin/so-kibana-config-export +++ b/salt/common/tools/sbin/so-kibana-config-export @@ -1,10 +1,5 @@ #!/bin/bash # -# {%- set FLEET_MANAGER = salt['pillar.get']('global:fleet_manager', False) -%} -# {%- set FLEET_NODE = salt['pillar.get']('global:fleet_node', False) -%} -# {%- set FLEET_IP = salt['pillar.get']('global:fleet_ip', '') %} -# {%- set MANAGER = salt['pillar.get']('global:url_base', '') %} -# # Copyright 2014-2023 Security Onion Solutions, LLC # # This program is free software: you can redistribute it and/or modify @@ -19,6 +14,10 @@ # # You should have received a copy of the GNU General Public License # along with this program. If not, see . +{%- set FLEET_MANAGER = salt['pillar.get']('global:fleet_manager', False) %} +{%- set FLEET_NODE = salt['pillar.get']('global:fleet_node', False) %} +{%- set FLEET_IP = salt['pillar.get']('global:fleet_ip', '') %} +{%- set MANAGER = salt['pillar.get']('global:url_base', '') %} KIBANA_HOST={{ MANAGER }} KSO_PORT=5601