diff --git a/pillar/top.sls b/pillar/top.sls index 0d713d64d..d7f0663fd 100644 --- a/pillar/top.sls +++ b/pillar/top.sls @@ -146,9 +146,12 @@ base: {% if salt['file.file_exists']('/opt/so/saltstack/local/pillar/kibana/secrets.sls') %} - kibana.secrets {% endif %} + - kratos.soc_kratos + - elasticsearch.soc_elasticsearch + - manager.soc_manager + - soc.soc_soc - soc_global - adv_global - - manager.soc_manager - backup.soc_backup - backup.adv_backup - minions.{{ grains.id }} diff --git a/salt/common/tools/sbin/so-minion b/salt/common/tools/sbin/so-minion index 609ce184a..7e4932ba0 100755 --- a/salt/common/tools/sbin/so-minion +++ b/salt/common/tools/sbin/so-minion @@ -165,7 +165,21 @@ function add_sensor_to_minion() { echo " enabled: True" >> $PILLARFILE } -function createSTANDALONE() { +function createEVAL() { + add_elastic_to_minion + add_sensor_to_minion +} + +function createIDHNODE() { + echo "Nothing custom needed for IDH nodes" +} + +function createIMPORT() { + add_elastic_to_minion + add_sensor_to_minion +} + +function createHEAVYNODE() { add_elastic_to_minion add_sensor_to_minion } @@ -178,16 +192,6 @@ function createMASTERSEARCH() { add_elastic_to_minion } -function createHEAVYNODE() { - add_elastic_to_minion - add_sensor_to_minion -} - -function createEVAL() { - add_elastic_to_minion - add_sensor_to_minion -} - function createSENSOR() { add_sensor_to_minion } @@ -196,8 +200,9 @@ function createSEARCHNODE() { add_elastic_to_minion } -function createIDHNODE() { - echo "Nothing custom needed for IDH nodes" +function createSTANDALONE() { + add_elastic_to_minion + add_sensor_to_minion } function testConnection() { diff --git a/salt/vars/import.map.jinja b/salt/vars/import.map.jinja new file mode 100644 index 000000000..198db31dd --- /dev/null +++ b/salt/vars/import.map.jinja @@ -0,0 +1,13 @@ +{% from 'vars/elasticsearch.map.jinja' import ELASTICSEARCH_GLOBALS %} + +{% set ROLE_GLOBALS = {} %} + +{% set IMPORT_GLOBALS = + [ + ELASTICSEARCH_GLOBALS + ] +%} + +{% for sg in IMPORT_GLOBALS %} +{% do salt['defaults.merge'](ROLE_GLOBALS, sg, merge_lists=False, in_place=True) %} +{% endfor %}