diff --git a/salt/storage/init.sls b/salt/storage/init.sls index 5bce7e71a..533366fd0 100644 --- a/salt/storage/init.sls +++ b/salt/storage/init.sls @@ -3,5 +3,11 @@ # https://securityonion.net/license; you may not use this file except in compliance with the # Elastic License 2.0. + +{% set nvme_devices = salt['cmd.shell']("find /dev -name 'nvme*n1' 2>/dev/null") %} +{% if nvme_devices %} + include: - storage.nsm_mount + +{% endif %} diff --git a/salt/storage/nsm_mount.sls b/salt/storage/nsm_mount.sls index b0476e054..ed9e97c33 100644 --- a/salt/storage/nsm_mount.sls +++ b/salt/storage/nsm_mount.sls @@ -23,7 +23,7 @@ storage_nsm_mount_logdir: storage_nsm_mount_script: file.managed: - name: /usr/sbin/so-nsm-mount - - source: salt://storage/files/so-nsm-mount + - source: salt://storage/tools/sbin/so-nsm-mount - mode: 755 - user: root - group: root diff --git a/salt/storage/files/so-nsm-cleanup b/salt/storage/tools/sbin/so-nsm-cleanup similarity index 100% rename from salt/storage/files/so-nsm-cleanup rename to salt/storage/tools/sbin/so-nsm-cleanup diff --git a/salt/storage/files/so-nsm-mount b/salt/storage/tools/sbin/so-nsm-mount similarity index 100% rename from salt/storage/files/so-nsm-mount rename to salt/storage/tools/sbin/so-nsm-mount