mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Feature/Fleet-Standalone
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
{%- set MYSQLPASS = salt['pillar.get']('auth:mysql', 'iwonttellyou') -%}
|
||||
{%- set MYSQLPASS = salt['pillar.get']('auth:mysql', None) -%}
|
||||
{{ MYSQLPASS }}
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
{%- set MYSQLPASS = salt['pillar.get']('auth:mysql', 'iwonttellyou') %}
|
||||
{%- set FLEETPASS = salt['pillar.get']('auth:fleet', 'bazinga') %}
|
||||
{%- set MYSQLPASS = salt['pillar.get']('auth:mysql', None) %}
|
||||
{%- set MASTERIP = salt['pillar.get']('static:masterip', '') %}
|
||||
{% set VERSION = salt['pillar.get']('static:soversion', 'HH1.1.4') %}
|
||||
{% set MASTER = salt['grains.get']('master') %}
|
||||
{% set MAINIP = salt['pillar.get']('node:mainip') %}
|
||||
{% set FLEETARCH = salt['grains.get']('role') %}
|
||||
|
||||
{% if FLEETARCH == "so-fleet" %}
|
||||
{% set MAINIP = salt['pillar.get']('node:mainip') %}
|
||||
{% else %}
|
||||
{% set MAINIP = salt['pillar.get']('static:masterip') %}
|
||||
{% endif %}
|
||||
|
||||
# MySQL Setup
|
||||
mysqlpkgs:
|
||||
pkg.installed:
|
||||
@@ -50,6 +58,16 @@ mysqldatadir:
|
||||
- group: 939
|
||||
- makedirs: True
|
||||
|
||||
{% if MYSQLPASS == None %}
|
||||
|
||||
mysql_password_none:
|
||||
test.configurable_test_state:
|
||||
- changes: False
|
||||
- result: False
|
||||
- comment: "MySQL Password Error - Not Starting MySQL"
|
||||
|
||||
{% else %}
|
||||
|
||||
so-mysql:
|
||||
docker_container.running:
|
||||
- image: {{ MASTER }}:5000/soshybridhunter/so-mysql:{{ VERSION }}
|
||||
@@ -58,7 +76,7 @@ so-mysql:
|
||||
- port_bindings:
|
||||
- 0.0.0.0:3306:3306
|
||||
- environment:
|
||||
- MYSQL_ROOT_HOST={{ MASTERIP }}
|
||||
- MYSQL_ROOT_HOST={{ MAINIP }}
|
||||
- MYSQL_ROOT_PASSWORD=/etc/mypass
|
||||
- binds:
|
||||
- /opt/so/conf/mysql/etc/my.cnf:/etc/my.cnf:ro
|
||||
@@ -67,3 +85,4 @@ so-mysql:
|
||||
- /opt/so/log/mysql:/var/log/mysql:rw
|
||||
- watch:
|
||||
- /opt/so/conf/mysql/etc
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user