infra-generale/execute_script_all.sh

9 lines
171 B
Bash
Raw Normal View History

2022-05-20 22:13:38 +02:00
script=$1
VMs=$(sudo virsh list --state-running --name | grep chalec)
for vm in $VMs
do
echo Executing script $script on $vm ...
ssh $vm 'bash -s' < $script
done