mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Move ntp server array to its own pillar in the minion sls file
This commit is contained in:
@@ -1591,8 +1591,7 @@ manager_pillar() {
|
|||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
" kratoskey: '$KRATOSKEY'"\
|
" kratoskey: '$KRATOSKEY'"\
|
||||||
"" >> "$pillar_file"
|
"" >> "$pillar_file"
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
manager_global() {
|
manager_global() {
|
||||||
local global_pillar="$local_salt_dir/pillar/global.sls"
|
local global_pillar="$local_salt_dir/pillar/global.sls"
|
||||||
@@ -1620,12 +1619,7 @@ manager_global() {
|
|||||||
" mdengine: '$ZEEKVERSION'"\
|
" mdengine: '$ZEEKVERSION'"\
|
||||||
" ids: '$NIDS'"\
|
" ids: '$NIDS'"\
|
||||||
" url_base: '$REDIRECTIT'"\
|
" url_base: '$REDIRECTIT'"\
|
||||||
" managerip: '$MAINIP'"\
|
" managerip: '$MAINIP'" > "$global_pillar"
|
||||||
" ntp_servers:" > "$global_pillar"
|
|
||||||
|
|
||||||
for addr in "${ntp_servers[@]}"; do
|
|
||||||
echo " - '$addr'" >> "$global_pillar"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ $is_airgap ]]; then
|
if [[ $is_airgap ]]; then
|
||||||
printf '%s\n'\
|
printf '%s\n'\
|
||||||
@@ -1775,7 +1769,6 @@ manager_global() {
|
|||||||
"redis_settings:"\
|
"redis_settings:"\
|
||||||
" redis_maxmemory: 812" >> "$global_pillar"
|
" redis_maxmemory: 812" >> "$global_pillar"
|
||||||
|
|
||||||
|
|
||||||
printf '%s\n' '----' >> "$setup_log" 2>&1
|
printf '%s\n' '----' >> "$setup_log" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1837,6 +1830,19 @@ network_setup() {
|
|||||||
} >> "$setup_log" 2>&1
|
} >> "$setup_log" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ntp_pillar() {
|
||||||
|
local pillar_file="$temp_install_dir"/pillar/minions/"$MINION_ID".sls
|
||||||
|
|
||||||
|
if [[ ${#ntp_servers[@]} -gt 0 ]]; then
|
||||||
|
printf '%s\n'\
|
||||||
|
"ntp:"\
|
||||||
|
" servers:" >> "$global_pillar"
|
||||||
|
for addr in "${ntp_servers[@]}"; do
|
||||||
|
printf '%s\n' " - '$addr'" >> "$pillar_file"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
parse_install_username() {
|
parse_install_username() {
|
||||||
# parse out the install username so things copy correctly
|
# parse out the install username so things copy correctly
|
||||||
INSTALLUSERNAME=${SUDO_USER:-${USER}}
|
INSTALLUSERNAME=${SUDO_USER:-${USER}}
|
||||||
|
|||||||
@@ -584,6 +584,7 @@ set_redirect >> $setup_log 2>&1
|
|||||||
set_progress_str 0 'Running initial configuration steps'
|
set_progress_str 0 'Running initial configuration steps'
|
||||||
|
|
||||||
[[ ${#ntp_servers[@]} -gt 0 ]] && configure_ntp >> $setup_log 2>&1
|
[[ ${#ntp_servers[@]} -gt 0 ]] && configure_ntp >> $setup_log 2>&1
|
||||||
|
ntp_pillar >> $setup_log 2>&1
|
||||||
|
|
||||||
reserve_ports
|
reserve_ports
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user