Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable startup_states: highstate on managers during setup and not wit… #12118

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions salt/salt/minion.sls
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ enable_startup_states:
file.uncomment:
- name: /etc/salt/minion
- regex: '^startup_states: highstate$'
- unless: pgrep so-setup

# prior to 2.4.30 this managed file would restart the salt-minion service when updated
# since this file is currently only adding a sleep timer on service start
Expand Down
7 changes: 7 additions & 0 deletions setup/so-functions
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,13 @@ configure_minion() {
} >> "$setup_log" 2>&1
}

checkin_at_boot() {
local minion_config=/etc/salt/minion

info "Enabling checkin at boot"
sed -i 's/#startup_states: highstate/startup_states: highstate/' "$minion_config"
}

check_requirements() {
local req_mem
local req_cores
Expand Down
1 change: 1 addition & 0 deletions setup/so-setup
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,7 @@ if ! [[ -f $install_opt_file ]]; then
title "Setting up Playbook"
logCmd "so-playbook-reset"
fi
checkin_at_boot
set_initial_firewall_access
logCmd "salt-call schedule.enable -linfo --local"
verify_setup
Expand Down
Loading