command: "ip addr add {{ gateway_ip_mask }} brd {{ broadcast_ip }} dev {{ gateway_interface }}"
when: gateway_ip_result|failed
-- name: prepare script to create networks for functest
- template:
- src: prepare-functest.sh.j2
- dest: /root/prepare-functest.sh
- mode: 0755
-
-- name: Create networks
- shell: "/root/prepare-functest.sh"
-
- 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: execute the script
+ shell: "/root/run-functest.sh"
--allocation-pool {{ allocation_pool }} \
--subnet-range {{ subnet_cidr }} --gateway {{ gateway_ip }} \
--no-dhcp {{ subnet_name }}
+
+mkdir ~/images && cd ~/images && wget http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img && cd ~
+
+sudo docker run --env-file env \
+ -v $(pwd)/openrc:/home/opnfv/functest/conf/openstack.creds \
+ -v $(pwd)/images:/home/opnfv/functest/images \
+ opnfv/functest-healthcheck
# See the License for the specific language governing permissions and
# limitations under the License.
-- name: Setup functest installing required packages and create the public network
+- name: Prepare the environment for functest and run tests
hosts: opnfv
+ user: root
roles:
- - role: "prepare-functest"
+ - role: "run-functest"