feat: Ensure salt-minion is not installed
This commit is contained in:
committed by
Carlos Álvaro
parent
aeaae89940
commit
ee81ee23d8
@@ -48,7 +48,7 @@ download "${BOOTSTRAP_URL}" "${BOOTSTRAP_FILE}"
|
||||
check_sha256 "${BOOTSTRAP_FILE}" "${BOOTSTRAP_SHA256}"
|
||||
|
||||
# Bootstrap script options:
|
||||
# https://docs.saltstack.com/en/latest/topics/tutorials/salt_bootstrap.html#command-line-options
|
||||
# https://docs.saltproject.io/salt/install-guide/en/latest/topics/bootstrap.html
|
||||
## -M: install Salt Master by default
|
||||
## -N: Do not install salt-minion
|
||||
## -X: Do not start daemons after installation
|
||||
@@ -65,6 +65,13 @@ log_debug "Options: ${SALT_BOOTSTRAP_OPTS[@]}"
|
||||
sh "${BOOTSTRAP_FILE}" ${SALT_BOOTSTRAP_OPTS[@]} git "v${SALT_VERSION}"
|
||||
chown -R "${SALT_USER}": "${SALT_ROOT_DIR}"
|
||||
|
||||
# Patch to remove salt-minion
|
||||
SALT_MINION="$(command -v salt-minion)"
|
||||
if [[ -n "${SALT_MINION}" ]]; then
|
||||
log_warn "Removing salt-minion ..."
|
||||
rm -f "${SALT_MINION}"
|
||||
fi
|
||||
|
||||
# Configure ssh
|
||||
log_info "Configuring ssh ..."
|
||||
sed -i -e "s|^[# ]*StrictHostKeyChecking.*$| StrictHostKeyChecking no|" /etc/ssh/ssh_config
|
||||
|
||||
Reference in New Issue
Block a user