Chore: Upgrade Jenkins-job-builder to 6.3.0
[releng/global-jjb.git] / shell / openstack-stack-copy-ssh-keys.sh
index a1a01cb..f20e1d9 100644 (file)
@@ -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" ) &