From b602b6772d364c40399f751b45206d6a2fe7ccb7 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Tue, 4 Nov 2014 14:03:51 +0100 Subject: controller: shutdown VM when run was successful New script 'dtf-return-machine' returns the VM to OpenStack based on its public IP. In future, this may be abstracted to any VM provider (or VM pool or whatever), but that requires also some IP <=> VM mapping shared between dtf-get-machine and dtf-return-machine. * controller/.gitignore: Ignore new scripts. * controller/Makefile.am: Build new scripts. * controller/bin/dtf-return-machine.in: New script for VM * deletion. * controller/libexec/dtf-nova.in: New wrapper around 'nova' command, showing only data output where fields are separated by tabulator. * controller/share/dtf-controller/ansible/playbooks/fedora.yml: Finally call dtf-return-machine after successful test run. --- controller/share/dtf-controller/ansible/playbooks/fedora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'controller/share') diff --git a/controller/share/dtf-controller/ansible/playbooks/fedora.yml b/controller/share/dtf-controller/ansible/playbooks/fedora.yml index 1d49671..ea39e70 100644 --- a/controller/share/dtf-controller/ansible/playbooks/fedora.yml +++ b/controller/share/dtf-controller/ansible/playbooks/fedora.yml @@ -51,5 +51,5 @@ - include: "{{ config_ansibleplaybooksdir }}/include/download-results.yml" - name: stop the vm - shell: echo "not implemented yet" + local_action: shell "{{ config_bindir }}/dtf-return-machine" {{ inventory_hostname }} when: test_result.rc == 0 -- cgit