summaryrefslogtreecommitdiffstats
path: root/qa/qa_scripts/openstack/ceph_install_w_ansible/multi_action.sh
blob: abc368b0a12b6dab4a627f2e2856e7caea34e4e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env bash
source copy_func.sh
allparms=$*
cmdv=$1
shift
sites=$*
for mac in $sites; do
    echo $cmdv $mac
    if [ -f ~/secrets ]; then
        copy_file ~/secrets $mac . 0777 ubuntu:ubuntu
    fi
    copy_file execs/${cmdv} $mac . 0777 ubuntu:ubuntu
    ssh $mac ./${cmdv} &
done
./staller.sh $allparms
for mac in $sites; do
    ssh $mac sudo rm -rf secrets
done
echo "DONE"