summaryrefslogtreecommitdiffstats
path: root/controller/bin
diff options
context:
space:
mode:
Diffstat (limited to 'controller/bin')
-rw-r--r--controller/bin/dtf-get-machine.in23
-rw-r--r--controller/bin/dtf-run-remote.in2
2 files changed, 20 insertions, 5 deletions
diff --git a/controller/bin/dtf-get-machine.in b/controller/bin/dtf-get-machine.in
index 57e9fa4..6f9873c 100644
--- a/controller/bin/dtf-get-machine.in
+++ b/controller/bin/dtf-get-machine.in
@@ -2,8 +2,13 @@
. "@sysconfdir@/dtf.sh" || exit 1
+opt_quiet=0
+
die() { echo "$@" ; exit 1 ; }
-info() { echo " * $@" ; }
+info()
+{
+ test "$opt_quiet" -eq 0 && echo " * $@"
+}
opt_openstack_instance="$DTF_OPENSTACK_DEFAULT_ID"
opt_distro=fedora
@@ -45,7 +50,7 @@ get_ip()
)
-longopts="distro:,distro-version:,openstack-instance:,name:"
+longopts="distro:,distro-version:,openstack-instance:,name:,quiet"
ARGS=$(getopt -o "" -l "help,$longopts" -n "$0" -- "$@") \
|| exit 1
eval set -- "$ARGS"
@@ -58,6 +63,12 @@ while true; do
shift 2
;;
+ --quiet)
+ opt=$(sed -e 's/^--//' -e 's/[^[a-zA-Z0-9]/_/g'<<<"$1")
+ eval "opt_$opt=1"
+ shift
+ ;;
+
--help)
show_help 0
;;
@@ -68,6 +79,11 @@ while true; do
esac
done
+if test -n "$DTF_GET_MACHINE_FAKE_IP"; then
+ echo "$DTF_GET_MACHINE_FAKE_IP"
+ exit 0
+fi
+
test -z "$opt_openstack_instance" && die "no openstack intance ID used"
. "@pkgdatadir@/parse_credsfile" "$opt_openstack_instance" || exit 1
@@ -87,5 +103,4 @@ machine=$(boot "$opt_name" "$image" "$flavor")
info "machine id: $machine"
-ip=$(get_ip "$machine")
-info "ip: $ip"
+get_ip "$machine"
diff --git a/controller/bin/dtf-run-remote.in b/controller/bin/dtf-run-remote.in
index d801d28..229097f 100644
--- a/controller/bin/dtf-run-remote.in
+++ b/controller/bin/dtf-run-remote.in
@@ -97,7 +97,7 @@ workdir_prereq
testsuite_name="$(tarball)" || die "can not create dist tarball"
export ANSIBLE_HOST_KEY_CHECKING=False
-ansible-playbook "$run_playbook" \
+ansible-playbook -v "$run_playbook" \
--extra-vars "opt_generated_vars=@ansiblevarsdir@/generated-vars.yml" \
--extra-vars "opt_distro=$opt_distro" \
--extra-vars "opt_distro_ver=$opt_distro_ver" \