mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
set ip for wazuh-register-agent and dont apply nginx in setup for receiver
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
{%- set ip = salt['pillar.get']('elasticsearch:mainip', '') %}
|
{%- set ip = salt['pillar.get']('elasticsearch:mainip', '') %}
|
||||||
{%- elif grains['role'] == 'so-sensor' %}
|
{%- elif grains['role'] == 'so-sensor' %}
|
||||||
{%- set ip = salt['pillar.get']('sensor:mainip', '') %}
|
{%- set ip = salt['pillar.get']('sensor:mainip', '') %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set mainint = salt['pillar.get']('host:mainint') %}
|
||||||
|
{%- set ip = salt['grains.get']('ip_interfaces:' ~ mainint)[0] %}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|||||||
@@ -257,6 +257,7 @@ elif [ "$install_type" = 'IMPORT' ]; then
|
|||||||
is_import=true
|
is_import=true
|
||||||
elif [ "$install_type" = 'RECEIVER' ]; then
|
elif [ "$install_type" = 'RECEIVER' ]; then
|
||||||
is_minion=true
|
is_minion=true
|
||||||
|
is_receiver=true
|
||||||
elif [ "$install_type" = 'ANALYST' ]; then
|
elif [ "$install_type" = 'ANALYST' ]; then
|
||||||
cd .. || exit 255
|
cd .. || exit 255
|
||||||
exec bash so-analyst-install
|
exec bash so-analyst-install
|
||||||
@@ -783,7 +784,7 @@ echo "1" > /root/accept_changes
|
|||||||
set_progress_str 62 "$(print_salt_state_apply 'common')"
|
set_progress_str 62 "$(print_salt_state_apply 'common')"
|
||||||
salt-call state.apply -l info common >> $setup_log 2>&1
|
salt-call state.apply -l info common >> $setup_log 2>&1
|
||||||
|
|
||||||
if [[ ! $is_helix ]]; then
|
if [[ ! $is_helix || ! $is_receiver ]]; then
|
||||||
set_progress_str 62 "$(print_salt_state_apply 'nginx')"
|
set_progress_str 62 "$(print_salt_state_apply 'nginx')"
|
||||||
salt-call state.apply -l info nginx >> $setup_log 2>&1
|
salt-call state.apply -l info nginx >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user