Create the filepaths for the config files. Output the files and their contents after creation.

This commit is contained in:
2025-10-25 15:18:55 -07:00
parent a42d1d05df
commit 1f4abd2d6c

View File

@@ -9,6 +9,10 @@ LOCAL=$DIR/local.yml
URL="https://git.hyperling.com/me/env-ansible"
BRANCH="main"
general_config="/usr/local/etc/hyperling-scm/general.ini"
workstation_config="/usr/local/etc/hyperling-scm/workstation.ini"
server_config="/usr/local/etc/hyperling-scm/server.ini"
## Functions ##
# Accepts 1 parameter, it is used as the exit status.
@@ -135,6 +139,8 @@ if [[ -n "$create_general" && ! -f "$general_config" ]]; then
EOF
}
print_general_contents > "$general_config"
ls -lh "$general_config"
cat "$general_config"
fi
if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
function print_workstation_contents {
@@ -146,6 +152,8 @@ if [[ -n "$create_workstation" && ! -f "$workstation_config" ]]; then
EOF
}
print_workstation_contents > "$workstation_config"
ls -lh "$workstation_config"
cat "$workstation_config"
fi
if [[ -n "$create_server" && ! -f "$server_config" ]]; then
function print_server_contents {
@@ -154,6 +162,8 @@ if [[ -n "$create_server" && ! -f "$server_config" ]]; then
EOF
}
print_server_contents > "$server_config"
ls -lh "$server_config"
cat "$server_config"
fi
echo "Provisioning Ansible..."