From f7e288dec1de77be635c5024729fb97de02641ba Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Wed, 28 Feb 2018 11:37:52 +0000 Subject: functest: Move run-functest.sh execution out of ansible Ansible throws out the log at the end of task execution which makes it hard to read. This change renames the role to prepare-functest and then takes the script execution out which will be executed by releng/jjb/xci/xci-run-functest.sh. Change-Id: Icf399ce4f04357814ed7109cd11113a9decddc50 Signed-off-by: Fatih Degirmenci --- .../roles/prepare-functest/tasks/main.yml | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 xci/playbooks/roles/prepare-functest/tasks/main.yml (limited to 'xci/playbooks/roles/prepare-functest/tasks') diff --git a/xci/playbooks/roles/prepare-functest/tasks/main.yml b/xci/playbooks/roles/prepare-functest/tasks/main.yml new file mode 100644 index 00000000..243358fc --- /dev/null +++ b/xci/playbooks/roles/prepare-functest/tasks/main.yml @@ -0,0 +1,36 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017 SUSE Linux GmbH +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +- name: check if the gateway was already set + shell: "ip a | grep {{ gateway_ip }}" + register: gateway_ip_result + ignore_errors: True + +- name: add public network gateway + command: "ip addr add {{ gateway_ip_mask }} brd {{ broadcast_ip }} dev {{ gateway_interface }}" + when: gateway_ip_result|failed + +- name: prepare environment file for functest + template: + src: env.j2 + dest: /root/env + mode: 0755 + +- name: prepare the script to create networks and run functest + template: + src: run-functest.sh.j2 + dest: /root/run-functest.sh + mode: 0755 + +- name: install required packages + package: + name: "{{ item }}" + state: present + with_items: + - wget -- cgit 1.2.3-korg