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'\
|
||||
" kratoskey: '$KRATOSKEY'"\
|
||||
"" >> "$pillar_file"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
manager_global() {
|
||||
local global_pillar="$local_salt_dir/pillar/global.sls"
|
||||
@@ -1620,12 +1619,7 @@ manager_global() {
|
||||
" mdengine: '$ZEEKVERSION'"\
|
||||
" ids: '$NIDS'"\
|
||||
" url_base: '$REDIRECTIT'"\
|
||||
" managerip: '$MAINIP'"\
|
||||
" ntp_servers:" > "$global_pillar"
|
||||
|
||||
for addr in "${ntp_servers[@]}"; do
|
||||
echo " - '$addr'" >> "$global_pillar"
|
||||
done
|
||||
" managerip: '$MAINIP'" > "$global_pillar"
|
||||
|
||||
if [[ $is_airgap ]]; then
|
||||
printf '%s\n'\
|
||||
@@ -1774,7 +1768,6 @@ manager_global() {
|
||||
" bip: '$DOCKERBIP'"\
|
||||
"redis_settings:"\
|
||||
" redis_maxmemory: 812" >> "$global_pillar"
|
||||
|
||||
|
||||
printf '%s\n' '----' >> "$setup_log" 2>&1
|
||||
}
|
||||
@@ -1837,6 +1830,19 @@ network_setup() {
|
||||
} >> "$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 out the install username so things copy correctly
|
||||
INSTALLUSERNAME=${SUDO_USER:-${USER}}
|
||||
|
||||
@@ -584,6 +584,7 @@ set_redirect >> $setup_log 2>&1
|
||||
set_progress_str 0 'Running initial configuration steps'
|
||||
|
||||
[[ ${#ntp_servers[@]} -gt 0 ]] && configure_ntp >> $setup_log 2>&1
|
||||
ntp_pillar >> $setup_log 2>&1
|
||||
|
||||
reserve_ports
|
||||
|
||||
|
||||
Reference in New Issue
Block a user