summaryrefslogtreecommitdiffstats
path: root/controller/share/dtf-controller
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-10-27 10:02:28 +0100
committerPavel Raiskup <praiskup@redhat.com>2014-10-27 10:12:15 +0100
commit9e89d125a84334f0aea38ba780fd56cc4dd7cd5c (patch)
tree93606666f3eadd9c1b274cd8d1e5810b656d56ac /controller/share/dtf-controller
parent0c345ec6b2db80b0517e4a63b8eb55333948fcbf (diff)
downloadpostgresql-setup-tests-9e89d125a84334f0aea38ba780fd56cc4dd7cd5c.tar.gz
postgresql-setup-tests-9e89d125a84334f0aea38ba780fd56cc4dd7cd5c.tar.xz
postgresql-setup-tests-9e89d125a84334f0aea38ba780fd56cc4dd7cd5c.zip
controller/dtf-run-remote: start VM via dtf-get-machine
.. rather than by ansible nova_compute module directly. Allows me implement more variability in VM handling. * controller/bin/dtf-get-machine.in: Add --quiet option which causes that only allocated IP is shown. Add also DTF_GET_MACHINE_FAKE_IP variable usable for faster debugging; when set, dtf-get-machine prints its content to standard output without allocating new VM. * controller/bin/dtf-run-remote.in: Add -v (verbose) option to ansible-playbook call to get more verbose output. * controller/share/dtf-controller/ansible/playbooks/fedora.yml: Use dtf-get-machine. Also remove creds file requirement.
Diffstat (limited to 'controller/share/dtf-controller')
-rw-r--r--controller/share/dtf-controller/ansible/playbooks/fedora.yml21
1 files changed, 4 insertions, 17 deletions
diff --git a/controller/share/dtf-controller/ansible/playbooks/fedora.yml b/controller/share/dtf-controller/ansible/playbooks/fedora.yml
index 215e048..7c62f61 100644
--- a/controller/share/dtf-controller/ansible/playbooks/fedora.yml
+++ b/controller/share/dtf-controller/ansible/playbooks/fedora.yml
@@ -3,7 +3,6 @@
gather_facts: False
hosts: localhost
vars_files:
- - "{{ opt_credsfile }}"
- "{{ opt_generated_vars }}"
tasks:
@@ -11,23 +10,12 @@
local_action: shell echo `dd if=/dev/urandom bs=1k count=10 | md5sum ; echo DBTESTS`
register: vm_name
- - debug: msg="osusername={{ os_username }}"
-
- - name: spin it up
- local_action: nova_compute auth_url={{os_auth_url}}
- flavor_id={{os_flavor_id}} image_id="{{ os_image_id }}" key_name={{ os_keypair }}
- login_password={{os_nova_password}} login_tenant_name="{{os_tenant_name}}"
- login_username={{os_username}} security_groups={{os_security_group}}
- wait=yes name="{{vm_name.stdout}}" wait_for=600
- register: nova
-
- - debug: msg="{{ nova.info.addresses }}"
-
- # This is ugly as hell... Hopefully nothing will be changing.
- - local_action: command echo "{{ nova.info.addresses[os_network_dev][1].addr }}"
+ - local_action: shell {{ config_bindir }}/dtf-get-machine
+ --distro {{ opt_distro }} --distro-version {{ opt_distro_ver }}
+ --quiet --name "{{ vm_name.stdout }}"
register: machine_ip
- - debug: msg="{{ machine_ip.stdout }}"
+ - debug: var=machine_ip
- name: wait for the host to be hot
local_action: wait_for host={{ machine_ip.stdout }} port=22 delay=5 timeout=600
@@ -42,7 +30,6 @@
user: root
gather_facts: False
vars_files:
- - "{{ opt_credsfile }}"
- "{{ opt_generated_vars }}"
tasks:
- copy: src={{ opt_workdir }}/{{ opt_testsuite_name }}.tar.gz