Browse Source

deploy ssh:move configuration load and validation into separate function

re-factor in support of adding multiple ssh runs with different
configurations
pull/4509/head
dharp 2 years ago
parent
commit
5c8a674d18
  1. 18
      deploy/ssh.sh

18
deploy/ssh.sh

@ -43,6 +43,19 @@ ssh_deploy() {
_debug _cca "$_cca" _debug _cca "$_cca"
_debug _cfullchain "$_cfullchain" _debug _cfullchain "$_cfullchain"
if ! _ssh_load_config; then
return 1
fi
_deploy_ssh_servers="$DEPLOY_SSH_SERVER"
for DEPLOY_SSH_SERVER in $_deploy_ssh_servers; do
_ssh_deploy
done
}
_ssh_load_config() {
_deploy_ssh_servers=""
# USER is required to login by SSH to remote host. # USER is required to login by SSH to remote host.
_migratedeployconf Le_Deploy_ssh_user DEPLOY_SSH_USER _migratedeployconf Le_Deploy_ssh_user DEPLOY_SSH_USER
_getdeployconf DEPLOY_SSH_USER _getdeployconf DEPLOY_SSH_USER
@ -169,11 +182,6 @@ ssh_deploy() {
else else
_info "Required commands batched and sent in single call to remote host" _info "Required commands batched and sent in single call to remote host"
fi fi
_deploy_ssh_servers="$DEPLOY_SSH_SERVER"
for DEPLOY_SSH_SERVER in $_deploy_ssh_servers; do
_ssh_deploy
done
} }
_ssh_deploy() { _ssh_deploy() {

Loading…
Cancel
Save