--- # 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: 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 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