diff options
Diffstat (limited to 'mcp/scripts')
-rw-r--r-- | mcp/scripts/lib.sh | 5 | ||||
-rwxr-xr-x | mcp/scripts/salt.sh | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 6baed8c81..982cc37fd 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -151,8 +151,9 @@ function cleanup_mounts { function cleanup_uefi { # Clean up Ubuntu boot entry if cfg01, kvm nodes online from previous deploy - # shellcheck disable=SC2086 - ssh ${SSH_OPTS} "${SSH_SALT}" "sudo salt -C 'kvm* or cmp*' cmd.run \ + local cmd_str="ssh ${SSH_OPTS} ${SSH_SALT}" + [ ! "$(hostname)" = 'cfg01' ] || cmd_str='eval' + ${cmd_str} "sudo salt -C 'kvm* or cmp*' cmd.run \ \"which efibootmgr > /dev/null 2>&1 && \ efibootmgr | grep -oP '(?<=Boot)[0-9]+(?=.*ubuntu)' | \ xargs -I{} efibootmgr --delete-bootnum --bootnum {}; \ diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index 25eb0ede8..d687e3efa 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -97,7 +97,7 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END salt -C "${NODE_MASK} or cfg01*" state.apply salt | \ grep -Fq 'No response' && salt -C "${NODE_MASK} or cfg01*" state.apply salt - salt -C 'I@salt:master' state.sls linux + salt-call state.sls linux || salt-call state.sls linux salt -C "${NODE_MASK} and not cfg01*" state.sls linux || true salt -C "${NODE_MASK} and not cfg01*" pkg.upgrade refresh=False |