X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fopenstack-stack-copy-ssh-keys.sh;h=f20e1d91b961037c4ea848c4453a71fdd22c9279;hb=a6dbbcc122ad46e11936a13f8816daa5278726e4;hp=a1a01cb115295f638914e140e60752fa8fc6c95d;hpb=61dc9c129cc8bf0618b03d543c406e5dc1f12e61;p=releng%2Fglobal-jjb.git diff --git a/shell/openstack-stack-copy-ssh-keys.sh b/shell/openstack-stack-copy-ssh-keys.sh index a1a01cb1..f20e1d91 100644 --- a/shell/openstack-stack-copy-ssh-keys.sh +++ b/shell/openstack-stack-copy-ssh-keys.sh @@ -50,12 +50,20 @@ copy_ssh_keys () { done } +# shellcheck disable=SC1090 +source ~/lf-env.sh + +lf-activate-venv --python python3 "lftools[openstack]" \ + kubernetes \ + python-heatclient \ + python-openstackclient + # IP Addresses are returned as a space separated list so word splitting is ok # shellcheck disable=SC2207 ip_addresses=($(openstack --os-cloud "$os_cloud" stack show -f json -c outputs "$stack_name" | - jq -r '.outputs[] | - select(.output_key | match("^vm_[0-9]+_ips$")) | - .output_value | .[]')) + jq -r '.outputs[] | + select(.output_key | match("^vm_[0-9]+_ips$")) | + .output_value | .[]')) pids="" for ip in "${ip_addresses[@]}"; do ( copy_ssh_keys "$ip" ) &