Playbook - Add flag for runtime

This commit is contained in:
Mike Reeves
2019-09-27 10:40:28 -04:00
parent 4352b1ebf6
commit 657ddc42a8
2 changed files with 10 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
{%- set WAZUH = salt['pillar.get']('master:wazuh', '0') -%}
{%- set GRAFANA = salt['pillar.get']('master:grafana', '0') -%}
{%- set THEHIVE = salt['pillar.get']('master:thehive', '0') -%}
{%- set PLAYBOOK = salt['pillar.get']('master:playbook', '0') -%}
base:
'G@role:so-sensor':
- ca
@@ -55,6 +56,10 @@ base:
{%- if THEHIVE != 0 %}
- hive
{%- endif %}
{%- if PLAYBOOK != 0 %}
- playbook
{%- endif %}
'G@role:so-master':
@@ -87,7 +92,10 @@ base:
{%- if THEHIVE != 0 %}
- hive
{%- endif %}
{%- if PLAYBOOK != 0 %}
- playbook
{%- endif %}
# Storage node logic

View File

@@ -539,6 +539,7 @@ master_pillar() {
echo " osquery: $OSQUERY" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
echo " wazuh: $WAZUH" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
echo " thehive: $THEHIVE" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
echo " playbook: 0" >> /opt/so/saltstack/pillar/masters/$HOSTNAME.sls
}
master_static() {