diff options
Diffstat (limited to 'controller/share/dtf-controller/ansible/run_include')
-rwxr-xr-x | controller/share/dtf-controller/ansible/run_include | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/controller/share/dtf-controller/ansible/run_include b/controller/share/dtf-controller/ansible/run_include new file mode 100755 index 0000000..4e84c7d --- /dev/null +++ b/controller/share/dtf-controller/ansible/run_include @@ -0,0 +1,19 @@ +#!/bin/bash + +export ANSIBLE_HOST_KEY_CHECKING=False + +workdir="$(dirname "${BASH_SOURCE[0]}")" +workdir=$(readlink -f "$workdir") + +export playbook=$(readlink -f "$1") + +( set -x + cd "$workdir" + + ansible-playbook -i "$workdir/../config/hosts" \ + --extra-vars "include_file=$playbook" \ + --extra-vars "script_name=dummy" \ + --extra-vars "opt_workdir=/tmp/dtf-$(date +%H%M%S%N)" \ + --extra-vars "target=host" \ + "dummy-wrapper.yml" +) |