Add more logging to setup process

This commit is contained in:
Mike Reeves
2022-09-12 15:56:08 -04:00
parent 7ec66d1cd1
commit a01fadd067

View File

@@ -822,7 +822,7 @@ copy_salt_master_config() {
logCmd "cp ../files/salt/master/master /etc/salt/master" logCmd "cp ../files/salt/master/master /etc/salt/master"
logCmd "cp ../files/salt/master/salt-master.service /usr/lib/systemd/system/salt-master.service" logCmd "cp ../files/salt/master/salt-master.service /usr/lib/systemd/system/salt-master.service"
fi fi
info "Copying pillar and salt files in '$temp_install_dir' to '$local_salt_dir'" info "Copying pillar and salt files in $temp_install_dir to $local_salt_dir"
logCmd "cp -Rv $temp_install_dir/pillar/ $local_salt_dir/" logCmd "cp -Rv $temp_install_dir/pillar/ $local_salt_dir/"
if [ -d "$temp_install_dir"/salt ] ; then if [ -d "$temp_install_dir"/salt ] ; then
logCmd "cp -Rv $temp_install_dir/salt/ $local_salt_dir/" logCmd "cp -Rv $temp_install_dir/salt/ $local_salt_dir/"
@@ -840,10 +840,10 @@ create_local_directories() {
for d in $(find $PILLARSALTDIR/$i -type d); do for d in $(find $PILLARSALTDIR/$i -type d); do
suffixdir=${d//$PILLARSALTDIR/} suffixdir=${d//$PILLARSALTDIR/}
if [ ! -d "$local_salt_dir/$suffixdir" ]; then if [ ! -d "$local_salt_dir/$suffixdir" ]; then
logCmd "mkdir -pv '$local_salt_dir$suffixdir'" logCmd "mkdir -pv $local_salt_dir$suffixdir"
fi fi
done done
logCmd "chown -R socore:socore '$local_salt_dir/$i'" logCmd "chown -R socore:socore $local_salt_dir/$i"
done done
} }
@@ -1045,7 +1045,7 @@ docker_seed_registry() {
elasticsearch_pillar() { elasticsearch_pillar() {
title "Create Advanced File" title "Create Advanced File"
logCmd "touch '$adv_elasticsearch_pillar_file'" logCmd "touch $adv_elasticsearch_pillar_file"
# Create the Elasticsearch pillar # Create the Elasticsearch pillar
printf '%s\n'\ printf '%s\n'\
"elasticsearch:"\ "elasticsearch:"\
@@ -1154,7 +1154,7 @@ firewall_generate_templates() {
title "Generate Firewall Template" title "Generate Firewall Template"
local firewall_pillar_path=$local_salt_dir/salt/firewall local firewall_pillar_path=$local_salt_dir/salt/firewall
logCmd "mkdir -p '$firewall_pillar_path'" logCmd "mkdir -p $firewall_pillar_path"
logCmd "cp ../files/firewall/* /opt/so/saltstack/local/salt/firewall/" logCmd "cp ../files/firewall/* /opt/so/saltstack/local/salt/firewall/"
@@ -1226,10 +1226,10 @@ get_minion_type() {
install_cleanup() { install_cleanup() {
if [ -f "$temp_install_dir" ]; then if [ -f "$temp_install_dir" ]; then
info "Installer removing the following files:" info "Installer removing the following files:"
logCmd "ls -lR '$temp_install_dir'" logCmd "ls -lR $temp_install_dir"
# Clean up after ourselves # Clean up after ourselves
logCmd "rm -rf '$temp_install_dir'" logCmd "rm -rf $temp_install_dir"
fi fi
# All cleanup prior to this statement must be compatible with automated testing. Cleanup # All cleanup prior to this statement must be compatible with automated testing. Cleanup
@@ -1585,7 +1585,7 @@ patch_schedule_os_new() {
local OSPATCHSCHEDULEDIR="$temp_install_dir/salt/patch/os/schedules" local OSPATCHSCHEDULEDIR="$temp_install_dir/salt/patch/os/schedules"
local OSPATCHSCHEDULE="$OSPATCHSCHEDULEDIR/$PATCHSCHEDULENAME.yml" local OSPATCHSCHEDULE="$OSPATCHSCHEDULEDIR/$PATCHSCHEDULENAME.yml"
logCmd "mkdir -p '$OSPATCHSCHEDULEDIR'" logCmd "mkdir -p $OSPATCHSCHEDULEDIR"
printf '%s\n'\ printf '%s\n'\
"patch:"\ "patch:"\