mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Fleet standalone - custom hostnames
This commit is contained in:
@@ -2,12 +2,19 @@
|
||||
{% set ENROLLSECRET = salt['pillar.get']('secrets:fleet_enroll-secret') %}
|
||||
{% set CURRENTPACKAGEVERSION = salt['pillar.get']('static:fleet_packages-version') %}
|
||||
{% set VERSION = salt['pillar.get']('static:soversion') %}
|
||||
{% set CUSTOM_FLEET_HOSTNAME = salt['pillar.get']('static:fleet_custom_hostname', None) %}
|
||||
|
||||
{% if CUSTOM_FLEET_HOSTNAME != None %}
|
||||
{% set HOSTNAME = {{ CUSTOM_FLEET_HOSTNAME }} %}
|
||||
{% else %}
|
||||
{% set HOSTNAME = {{ grains.host }} %}
|
||||
{% endif %}
|
||||
|
||||
so/fleet:
|
||||
event.send:
|
||||
- data:
|
||||
action: 'genpackages'
|
||||
hostname: {{ grains.host }}
|
||||
package-hostname: {{ HOSTNAME }}
|
||||
role: {{ grains.role }}
|
||||
mainip: {{ grains.host }}
|
||||
enroll-secret: {{ ENROLLSECRET }}
|
||||
|
||||
9
salt/fleet/event_update-custom-hostname.sls
Normal file
9
salt/fleet/event_update-custom-hostname.sls
Normal file
@@ -0,0 +1,9 @@
|
||||
{% set CUSTOM_FLEET_HOSTNAME = salt['pillar.get']('static:fleet_custom_hostname', None) %}
|
||||
|
||||
so/fleet:
|
||||
event.send:
|
||||
- data:
|
||||
action: 'update_custom_hostname'
|
||||
custom_hostname: {{ CUSTOM_FLEET_HOSTNAME }}
|
||||
role: {{ grains.role }}
|
||||
|
||||
Reference in New Issue
Block a user