This commit is contained in:
m0duspwnens
2020-05-27 17:18:17 -04:00
parent 59cc927878
commit 63e0a1e8a2
2 changed files with 18 additions and 11 deletions

View File

@@ -59,10 +59,8 @@ add_master_hostfile() {
addtotab_generate_templates() {
local addtotab_path=$local_salt_dir/pillar/data
mkdir -p "$addtotab_path"
for i in evaltab mastersearchtab mastertab nodestab sensorstab
do
for i in evaltab mastersearchtab mastertab nodestab sensorstab; do
printf '%s\n'\
"$i:"\
"" > "$addtotab_path"/$i.sls
@@ -455,6 +453,17 @@ copy_ssh_key() {
ssh-copy-id -f -i /root/.ssh/so.key soremote@"$MSRV"
}
create_local_directories() {
echo "Creating local pillar and salt directories"
for i in "pillar" "salt"; do
for d in `find ./$i/ -type d`; do
mkdir -p $local_salt_dir/$d
done
chown -R socore:socore $local_salt_dir/$i
done
}
create_sensor_bond() {
echo "Setting up sensor bond" >> "$setup_log" 2>&1

View File

@@ -365,6 +365,8 @@ fi
copy_master_config >> $setup_log 2>&1
setup_salt_master_dirs >> $setup_log 2>&1
firewall_generate_templates >> $setup_log 2>&1
create_local_directories >> $setup_log 2>&1
addtotab_generate_templates >> $setup_log 2>&1
set_progress_str 11 'Updating sudoers file for soremote user'
update_sudoers >> $setup_log 2>&1
@@ -406,10 +408,6 @@ fi
set_progress_str 21 'Copying minion pillars to master'
copy_minion_tmp_files >> $setup_log 2>&1
if [[ $is_master ]]; then
addtotab_generate_templates >> $setup_log 2>&1
fi
set_progress_str 22 'Generating CA and checking in'
salt_checkin >> $setup_log 2>&1