diff options
author | Markos Chandras <mchandras@suse.de> | 2018-03-09 09:17:16 +0000 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-03-10 09:49:56 +0000 |
commit | dc0fee7c092df7c2c1ff7627e33107969b46c6d2 (patch) | |
tree | e430482d181e0df9ec9d17ab11198bd17e1920d1 /xci/playbooks/roles/prepare-functest | |
parent | 75e75b5a411c376c52e9117742016b39a25a6ec3 (diff) |
xci: Move functest required packages to the functest role
The docker packages that we install in the OPNFV VM are needed by
functest so add them to the related role.
Change-Id: I6ebe76fd030859f757d41ecf20c30ab76888ee9c
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks/roles/prepare-functest')
-rw-r--r-- | xci/playbooks/roles/prepare-functest/tasks/main.yml | 25 | ||||
-rw-r--r-- | xci/playbooks/roles/prepare-functest/vars/main.yml | 14 |
2 files changed, 32 insertions, 7 deletions
diff --git a/xci/playbooks/roles/prepare-functest/tasks/main.yml b/xci/playbooks/roles/prepare-functest/tasks/main.yml index 243358fc..e781c4df 100644 --- a/xci/playbooks/roles/prepare-functest/tasks/main.yml +++ b/xci/playbooks/roles/prepare-functest/tasks/main.yml @@ -7,6 +7,24 @@ # 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 + - name: check if the gateway was already set shell: "ip a | grep {{ gateway_ip }}" register: gateway_ip_result @@ -27,10 +45,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 |