mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-03-20 03:57:02 +08:00
19 lines
397 B
Django/Jinja
Executable File
19 lines
397 B
Django/Jinja
Executable File
#! /bin/sh
|
|
|
|
die() { echo "$*" >&2 ; exit 1; }
|
|
|
|
set -x
|
|
set -e
|
|
test -n "$RESALLOC_NAME"
|
|
test -n "$RESALLOC_RESOURCE_DATA"
|
|
|
|
# we only put IP out in spawning script, nothing else
|
|
decoded=$(echo "$RESALLOC_RESOURCE_DATA" | base64 --decode)
|
|
IP=$(echo "$decoded" | yq .host || :)
|
|
if test -z "$IP"; then
|
|
set -- $(echo "$decoded")
|
|
IP=$1
|
|
fi
|
|
|
|
ssh -o ConnectTimeout=10 "root@$IP" copr-builder-cleanup
|