[fix] Run salt command to check in to master before accepting salt key

This commit is contained in:
William Wernert
2020-04-30 12:08:31 -04:00
parent 6359da0010
commit a44158261a
2 changed files with 12 additions and 6 deletions

View File

@@ -654,7 +654,6 @@ docker_seed_registry() {
}
fireeye_pillar() {
local fireeye_pillar_path=/opt/so/saltstack/pillar/fireeye
@@ -668,6 +667,10 @@ fireeye_pillar() {
}
salt_firstcheckin() {
salt-call state.show_top >> "$setup_log" 2>&1
}
fleet_pillar() {
local pillar_file="$temp_install_dir"/pillar/minions/"$MINION_ID".sls

View File

@@ -299,6 +299,9 @@ export percentage=0
master_pillar 2>> "$setup_log"
fi
set_progress_str 14 'Running first Salt checkin'
salt_firstcheckin 2>> "$setup_log"
if [[ $is_helix ]]; then
set_progress_str 15 'Generating the FireEye pillar'
fireeye_pillar 2>> "$setup_log"
@@ -315,19 +318,19 @@ export percentage=0
node_pillar 2>> "$setup_log"
fi
set_progress_str 19 'Generating CA and checking in'
salt_checkin 2>> "$setup_log"
if [[ $is_minion ]]; then
set_progress_str 20 'Accepting Salt key on master'
set_progress_str 19 'Accepting Salt key on master'
accept_salt_key_remote 2>> "$setup_log"
fi
if [[ $is_master ]]; then
set_progress_str 20 'Accepting Salt key'
set_progress_str 19 'Accepting Salt key'
salt-key -ya "$MINION_ID" >> "$setup_log" 2>&1
fi
set_progress_str 20 'Generating CA and checking in'
salt_checkin 2>> "$setup_log"
if [[ $is_master || $is_helix ]]; then
set_progress_str 25 'Downloading containers from the internet'
salt-call state.apply -l info registry >> "$setup_log" 2>&1