summaryrefslogtreecommitdiffstats
path: root/xci/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'xci/playbooks')
-rw-r--r--xci/playbooks/prepare-functest.yml3
-rw-r--r--xci/playbooks/roles/prepare-functest/tasks/main.yml26
-rw-r--r--xci/playbooks/roles/prepare-functest/vars/main.yml14
3 files changed, 36 insertions, 7 deletions
diff --git a/xci/playbooks/prepare-functest.yml b/xci/playbooks/prepare-functest.yml
index 6d5b01c6..a4cb664b 100644
--- a/xci/playbooks/prepare-functest.yml
+++ b/xci/playbooks/prepare-functest.yml
@@ -16,5 +16,8 @@
- name: Prepare the environment for functest
hosts: opnfv
user: root
+ vars_files:
+ - ../var/opnfv.yml
+ - ../installer/osa/files/openstack_services.yml
roles:
- role: "prepare-functest"
diff --git a/xci/playbooks/roles/prepare-functest/tasks/main.yml b/xci/playbooks/roles/prepare-functest/tasks/main.yml
index 243358fc..2797ce43 100644
--- a/xci/playbooks/roles/prepare-functest/tasks/main.yml
+++ b/xci/playbooks/roles/prepare-functest/tasks/main.yml
@@ -7,6 +7,25 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+
+- name: install functest required packages
+ package:
+ name: "{{ functest_required_packages[ansible_pkg_mgr] }}"
+ state: present
+
+# Docker is needed for functest
+- name: Ensure Docker service is started and enabled
+ service:
+ name: docker
+ state: started
+ enabled: yes
+
+- name: install functest required pip packages
+ pip:
+ name: "{{ functest_required_pip }}"
+ state: present
+ extra_args: '-c https://raw.githubusercontent.com/openstack/requirements/{{ requirements_git_install_branch }}/upper-constraints.txt'
+
- name: check if the gateway was already set
shell: "ip a | grep {{ gateway_ip }}"
register: gateway_ip_result
@@ -27,10 +46,3 @@
src: run-functest.sh.j2
dest: /root/run-functest.sh
mode: 0755
-
-- name: install required packages
- package:
- name: "{{ item }}"
- state: present
- with_items:
- - wget
diff --git a/xci/playbooks/roles/prepare-functest/vars/main.yml b/xci/playbooks/roles/prepare-functest/vars/main.yml
new file mode 100644
index 00000000..3a6c8a4d
--- /dev/null
+++ b/xci/playbooks/roles/prepare-functest/vars/main.yml
@@ -0,0 +1,14 @@
+---
+functest_required_packages:
+ apt:
+ - docker.io
+ - wget
+ zypper:
+ - docker
+ - wget
+ yum:
+ - docker
+ - wget
+
+functest_required_pip:
+ - docker-py