mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Configure Minion ID and Master address prior to Salt installation
This commit is contained in:
parent
cda950bd31
commit
e00d3963c6
1 changed files with 15 additions and 15 deletions
|
@ -6304,7 +6304,21 @@ if [ "$CONFIG_SALT_FUNC" != "null" ] && [ "$_TEMP_CONFIG_DIR" != "null" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Pre-Seed master keys
|
||||
# Drop the master address if passed
|
||||
if [ "$_SALT_MASTER_ADDRESS" != "null" ]; then
|
||||
[ ! -d "$_SALT_ETC_DIR/minion.d" ] && mkdir -p "$_SALT_ETC_DIR/minion.d"
|
||||
cat <<_eof > $_SALT_ETC_DIR/minion.d/99-master-address.conf
|
||||
master: $_SALT_MASTER_ADDRESS
|
||||
_eof
|
||||
fi
|
||||
|
||||
# Drop the minion id if passed
|
||||
if [ "$_SALT_MINION_ID" != "null" ]; then
|
||||
[ ! -d "$_SALT_ETC_DIR" ] && mkdir -p "$_SALT_ETC_DIR"
|
||||
echo "$_SALT_MINION_ID" > "$_SALT_ETC_DIR/minion_id"
|
||||
fi
|
||||
|
||||
# Pre-seed master keys
|
||||
if [ "$PRESEED_MASTER_FUNC" != "null" ] && [ "$_TEMP_KEYS_DIR" != "null" ]; then
|
||||
echoinfo "Running ${PRESEED_MASTER_FUNC}()"
|
||||
$PRESEED_MASTER_FUNC
|
||||
|
@ -6334,20 +6348,6 @@ if [ "$_INSTALL_MINION" -eq $BS_TRUE ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Drop the master address if passed
|
||||
if [ "$_SALT_MASTER_ADDRESS" != "null" ]; then
|
||||
[ ! -d "$_SALT_ETC_DIR/minion.d" ] && mkdir -p "$_SALT_ETC_DIR/minion.d"
|
||||
cat <<_eof > $_SALT_ETC_DIR/minion.d/99-master-address.conf
|
||||
master: $_SALT_MASTER_ADDRESS
|
||||
_eof
|
||||
fi
|
||||
|
||||
# Drop the minion id if passed
|
||||
if [ "$_SALT_MINION_ID" != "null" ]; then
|
||||
[ ! -d "$_SALT_ETC_DIR" ] && mkdir -p "$_SALT_ETC_DIR"
|
||||
echo "$_SALT_MINION_ID" > "$_SALT_ETC_DIR/minion_id"
|
||||
fi
|
||||
|
||||
# Run any post install function. Only execute function if not in config mode only
|
||||
if [ "$POST_INSTALL_FUNC" != "null" ] && [ "$_CONFIG_ONLY" -eq $BS_FALSE ]; then
|
||||
echoinfo "Running ${POST_INSTALL_FUNC}()"
|
||||
|
|
Loading…
Add table
Reference in a new issue