mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
copr-be: keep IP checker compatible with plain IP in base64 data
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user