summaryrefslogtreecommitdiffstats
path: root/controller/share/dtf-controller/ansible/playbooks/fedora.yml
diff options
context:
space:
mode:
authorPavel Raiskup <praiskup@redhat.com>2014-11-20 09:45:15 +0100
committerPavel Raiskup <praiskup@redhat.com>2014-11-20 09:45:15 +0100
commit5268c1ed3fb9816022618ef02995300a6221d98e (patch)
tree419a0202369123a4a97347f46fa5b0421a8ad2ca /controller/share/dtf-controller/ansible/playbooks/fedora.yml
parent16009ef5ac761b2d21ebf3618c1cedfa75b046d8 (diff)
downloadpostgresql-setup-tests-5268c1ed3fb9816022618ef02995300a6221d98e.tar.gz
postgresql-setup-tests-5268c1ed3fb9816022618ef02995300a6221d98e.tar.xz
postgresql-setup-tests-5268c1ed3fb9816022618ef02995300a6221d98e.zip
controller: make the system setup configurable
Add the --setup-playbook option for dtf-run-remote which allows us to submit configuration (or any) playbook which will be included into the default one, executed before actual testing. * controller/Makefile.am: s/fedora.yml/default.yml/. * controller/bin/dtf-controller.in: Call dtf-remote-run with --setup-playbook option. * controller/bin/dtf-run-remote.in: Fix the option parsing. Add new option --setup-playbook. (error): New function. (die): Use '$*' instead of '*@'. * controller/share/dtf-controller/ansible/playbooks/fedora.yml: Rename to default.yml. * controller/share/dtf-controller/ansible/playbooks/default.yml: Moved from fedora.yml. * controller/share/--/--/playbooks/include/prepare-testenv.yml: Removed hard-wired configuration.
Diffstat (limited to 'controller/share/dtf-controller/ansible/playbooks/fedora.yml')
-rw-r--r--controller/share/dtf-controller/ansible/playbooks/fedora.yml55
1 files changed, 0 insertions, 55 deletions
diff --git a/controller/share/dtf-controller/ansible/playbooks/fedora.yml b/controller/share/dtf-controller/ansible/playbooks/fedora.yml
deleted file mode 100644
index ea39e70..0000000
--- a/controller/share/dtf-controller/ansible/playbooks/fedora.yml
+++ /dev/null
@@ -1,55 +0,0 @@
-- name: self-standing testsuite
- remote_user: root
- gather_facts: False
- hosts: localhost
- vars_files:
- - "{{ opt_generated_vars }}"
-
- tasks:
- - name: generate builder name
- local_action: shell echo `dd if=/dev/urandom bs=1k count=10 | md5sum ; echo DBTESTS`
- register: vm_name
-
- - 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: 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
-
- - local_action: shell {{ config_libexecdir }}/dtf-wait-for-ssh "root@{{ machine_ip.stdout }}"
-
- - name: add it to the special group
- local_action: add_host hostname={{ machine_ip.stdout }}
- groupname=temp_group
-
-- hosts: temp_group
- user: root
- gather_facts: False
- vars_files:
- - "{{ opt_generated_vars }}"
- tasks:
- - copy: src={{ opt_workdir }}/{{ opt_testsuite_name }}.tar.gz
- dest=/root/{{ opt_testsuite_name }}.tar.gz
-
- - include: "{{ config_ansibleplaybooksdir }}/include/beakerlib.yml"
-
- - include: "{{ config_ansibleplaybooksdir }}/include/prepare-testenv.yml"
-
- - include: "{{ config_ansibleplaybooksdir }}/include/additional-packages.yml"
- when: dtf_rpm_files_list is defined
-
- - shell: cd /root && tar -xf {{ opt_testsuite_name }}.tar.gz
-
- - shell: cd /root/{{ opt_testsuite_name }}&& ./run --force &>/var/tmp/dtf-run.overview
- register: test_result
- ignore_errors: yes
-
- - include: "{{ config_ansibleplaybooksdir }}/include/download-results.yml"
-
- - name: stop the vm
- local_action: shell "{{ config_bindir }}/dtf-return-machine" {{ inventory_hostname }}
- when: test_result.rc == 0