mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
change how mine_functions.conf is managed during setup
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
mine_interval: 35
|
mine_interval: 35
|
||||||
mine_functions:
|
mine_functions:
|
||||||
network.ip_addrs:
|
network.ip_addrs:
|
||||||
- interface: {{ GLOBALS.main_interface }}
|
- interface: {{ pillar.host.mainint }}
|
||||||
{% if GLOBALS.is_manager -%}
|
{% if grains.role in ['so-eval','so-import','so-manager','so-managersearch','so-standalone'] -%}
|
||||||
x509.get_pem_entries:
|
x509.get_pem_entries:
|
||||||
- glob_path: '/etc/pki/ca.crt'
|
- glob_path: '/etc/pki/ca.crt'
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|||||||
5
salt/salt/mine_functions.sls
Normal file
5
salt/salt/mine_functions.sls
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
mine_functions:
|
||||||
|
file.managed:
|
||||||
|
- name: /etc/salt/minion.d/mine_functions.conf
|
||||||
|
- source: salt://salt/etc/minion.d/mine_functions.conf.jinja
|
||||||
|
- template: jinja
|
||||||
@@ -12,6 +12,7 @@ include:
|
|||||||
- salt
|
- salt
|
||||||
- systemd.reload
|
- systemd.reload
|
||||||
- repo.client
|
- repo.client
|
||||||
|
- salt.mine_functions
|
||||||
|
|
||||||
{% if INSTALLEDSALTVERSION|string != SALTVERSION|string %}
|
{% if INSTALLEDSALTVERSION|string != SALTVERSION|string %}
|
||||||
|
|
||||||
@@ -78,14 +79,6 @@ salt_minion_service_unit_file:
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
mine_functions:
|
|
||||||
file.managed:
|
|
||||||
- name: /etc/salt/minion.d/mine_functions.conf
|
|
||||||
- source: salt://salt/etc/minion.d/mine_functions.conf.jinja
|
|
||||||
- template: jinja
|
|
||||||
- defaults:
|
|
||||||
GLOBALS: {{ GLOBALS }}
|
|
||||||
|
|
||||||
# this has to be outside the if statement above since there are <requisite>_in calls to this state
|
# this has to be outside the if statement above since there are <requisite>_in calls to this state
|
||||||
salt_minion_service:
|
salt_minion_service:
|
||||||
service.running:
|
service.running:
|
||||||
|
|||||||
@@ -649,8 +649,7 @@ configure_minion() {
|
|||||||
"log_level_logfile: info"\
|
"log_level_logfile: info"\
|
||||||
"log_file: /opt/so/log/salt/minion" >> "$minion_config"
|
"log_file: /opt/so/log/salt/minion" >> "$minion_config"
|
||||||
|
|
||||||
cp -f ../salt/salt/etc/minion.d/mine_functions.conf.jinja /etc/salt/minion.d/mine_functions.conf
|
logCmd "salt-call state.apply salt.mine_functions -l info"
|
||||||
sed -i "s/{{ GLOBALS.main_interface }}/$MNIC/" /etc/salt/minion.d/mine_functions.conf
|
|
||||||
|
|
||||||
{
|
{
|
||||||
logCmd "systemctl enable salt-minion";
|
logCmd "systemctl enable salt-minion";
|
||||||
|
|||||||
Reference in New Issue
Block a user