Statistics
| Branch: | Revision:

iof-tools / run @ 27cc0deb

History | View | Annotate | Download (507 Bytes)

1
#!/usr/bin/env bash
2

    
3
testbed_exists=`echo $@ | grep testbed`
4
if [ "$testbed_exists" == "" ]; then
5
	testbed="twist"
6
else
7
	testbed=`echo $@ | sed -e "s/^.*testbed=\([a-zA-Z0-9]\+\).*$/\1/g"`
8
fi
9

    
10
. ./setenv.sh $testbed
11

    
12
if [ $# -ge 1 ]; then
13
	playbook=$1
14
	if [ $# -ge 2 ]; then
15
		shift
16
		args="--extra-vars \"$@\""
17
	fi
18
else
19
	playbook=echo-hostname.yaml
20
	args=""
21
fi
22

    
23
IOF_FOLDER=${HOME_FOLDER}/iof-tools/
24

    
25
ssh -A -F ${CONFIG_FILE} ${MASTER_NODE} "bash -ic 'cd ${IOF_FOLDER} && ansible-playbook $playbook $args'"