Initial commit of PassiveTest
Change-Id: Idcd9a0c72df5eae6b4eedc544e473ebc9763ccdb
diff --git a/install_viv.yaml b/install_viv.yaml
new file mode 100644
index 0000000..d7eb405
--- /dev/null
+++ b/install_viv.yaml
@@ -0,0 +1,30 @@
+---
+- hosts: '{{ instance_name }}'
+ gather_facts: False
+ connection: ssh
+ user: ubuntu
+ sudo: yes
+
+ tasks:
+
+ - name: copy viv image
+ copy: src=viv.docker dest=/tmp/viv.docker mode=0644
+
+ - name: check if we have a viv container already
+ register: docker_images
+ shell: docker images
+
+ - name: load viv container
+ shell: docker load -i /tmp/viv.docker
+ when: docker_images.stdout.find('viv') == -1
+
+ - name: check if viv container is already running
+ register: docker_containers
+ shell: docker ps
+
+ - name: launch the viv container
+ shell: docker run -d -p 8080:8080 -p 8082:8082 -v /dev:/dev -v /mnt:/mnt -v /lib/modules:/lib/modules --net=host --privileged -e IMODE="mmap" -e BLOCKING=1 --name=viv viv /opt/startContainer
+ when: docker_containers.stdout.find('viv') == -1
+
+ - name: remove viv
+ shell: rm -f /tmp/viv.docker