copr-be: keep IP checker compatible with plain IP in base64 data
This commit is contained in:
parent
f0549afb96
commit
823124c12e
1 changed files with 3 additions and 2 deletions
|
@ -38,10 +38,11 @@
|
|||
test -n "$RESALLOC_NAME"
|
||||
test -n "$RESALLOC_RESOURCE_DATA"
|
||||
decoded=$(echo "$RESALLOC_RESOURCE_DATA" | base64 --decode)
|
||||
IP=$(echo "$decoded" | yq .host) || {
|
||||
IP=$(echo "$decoded" | yq .host || :)
|
||||
if test -z "$IP"; then
|
||||
set -- $(echo "$decoded")
|
||||
IP=$1
|
||||
}
|
||||
fi
|
||||
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=10 "${SSH_USER-root}@$IP" true
|
||||
mode: "0755"
|
||||
dest: /usr/local/bin/resalloc-check-vm-ip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue