diff --git a/salt/top.sls b/salt/top.sls
index 42b88c170..52beeeae9 100644
--- a/salt/top.sls
+++ b/salt/top.sls
@@ -263,6 +263,7 @@ base:
- ca
- ssl
- common
+ - nginx
- telegraf
- firewall
{%- if WAZUH != 0 %}
diff --git a/salt/wazuh/files/wazuh-manager-whitelist b/salt/wazuh/files/wazuh-manager-whitelist
index 19ad63415..66dc13cd9 100755
--- a/salt/wazuh/files/wazuh-manager-whitelist
+++ b/salt/wazuh/files/wazuh-manager-whitelist
@@ -1,4 +1,5 @@
{%- set MASTERIP = salt['pillar.get']('static:masterip', '') %}
+{%- set WAZUH_ENABLED = salt['pillar.get']('static:wazuh', '0') %}
#!/bin/bash
local_salt_dir=/opt/so/saltstack/local
@@ -18,7 +19,7 @@ local_salt_dir=/opt/so/saltstack/local
# along with this program. If not, see .
# Check if Wazuh enabled
-if grep -q -R "wazuh: 1" $local_salt_dir/pillar/*; then
+if [ {{ WAZUH_ENABLED }} ]; then
WAZUH_MGR_CFG="/opt/so/wazuh/etc/ossec.conf"
if ! grep -q "{{ MASTERIP }}" $WAZUH_MGR_CFG ; then
DATE=`date`