mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
LS salt module - Add conditional language
This commit is contained in:
@@ -13,13 +13,18 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Logstash Section
|
# Logstash Section - Decide which pillar to use
|
||||||
|
|
||||||
{% if grains['role'] == 'so-sensor' %}
|
{% if grains['role'] == 'so-sensor' %}
|
||||||
|
|
||||||
{% set lsheap = salt['pillar.get']('sensor:lsheap', '') %}
|
{% set lsheap = salt['pillar.get']('sensor:lsheap', '') %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
||||||
{% set lsheap = salt['pillar.get']('master:lsheap', '') %}
|
{% set lsheap = salt['pillar.get']('master:lsheap', '') %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
# Create the logstash group
|
||||||
logstashgroup:
|
logstashgroup:
|
||||||
group.present:
|
group.present:
|
||||||
- name: logstash
|
- name: logstash
|
||||||
@@ -40,7 +45,7 @@ lscustdir:
|
|||||||
- group: 939
|
- group: 939
|
||||||
- makedirs: True
|
- makedirs: True
|
||||||
|
|
||||||
# Copy down all the configs including custom
|
# Copy down all the configs including custom - TODO add watch restart
|
||||||
lssync:
|
lssync:
|
||||||
file.recurse:
|
file.recurse:
|
||||||
- name: /opt/so/conf/logstash
|
- name: /opt/so/conf/logstash
|
||||||
@@ -76,7 +81,7 @@ lslogdir:
|
|||||||
# Add the container
|
# Add the container
|
||||||
|
|
||||||
so-logstash:
|
so-logstash:
|
||||||
dockerng.running:
|
docker_container.running:
|
||||||
- image: toosmooth/so-logstash:test2
|
- image: toosmooth/so-logstash:test2
|
||||||
- hostname: logstash
|
- hostname: logstash
|
||||||
- user: logstash
|
- user: logstash
|
||||||
|
|||||||
Reference in New Issue
Block a user