| --- |
| - name: Install Cord tester prerequisites |
| become: yes |
| apt: name={{ item }} state=latest force=yes |
| with_items: |
| - wget |
| - python |
| - python-dev |
| - python-pip |
| - python-setuptools |
| - python-scapy |
| - python-pexpect |
| - openvswitch-switch |
| - libssl-dev |
| - libffi-dev |
| |
| - name: Install Python Prerequisites for cord tester |
| become: yes |
| pip: name={{ item }} state=latest |
| with_items: |
| - nose |
| - monotonic |
| - configObj |
| - pyyaml |
| - nsenter |
| - pyroute2 |
| - netaddr |
| - python-daemon |
| - robotframework |
| - robotframework-requests |
| - robotframework-sshlibrary |
| |
| - name: Install scapy |
| pip: name=scapy version=2.3.2 state=present |
| |
| - name: Install scapy-ssl_tls |
| pip: name=scapy-ssl_tls version=1.2.2 state=present |
| |
| - name: Install docker-py |
| pip: name=docker-py version=1.9.0 state=present |
| |
| - name: Install paramiko |
| pip: name=paramiko version=1.10.1 state=present |
| |
| - name: Download Openvswitch {{ openvswitch_version }} |
| become: yes |
| get_url: |
| url: "{{ openvswitch_url }}/openvswitch-{{ openvswitch_version }}.tar.gz" |
| dest: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}.tar.gz" |
| force: yes |
| |
| - name: Untar Openvswitch {{ openvswitch_version }} |
| become: yes |
| unarchive: |
| src=openvswitch-{{ openvswitch_version }}.tar.gz |
| dest=/home/{{ ansible_user }} |
| |
| - name: Build Openvswitch {{ openvswitch_version }} |
| become: yes |
| shell: "{{ item }}" |
| args: |
| chdir: "/home/{{ ansible_user }}/openvswitch-{{ openvswitch_version }}" |
| with_items: |
| - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --disable-ssl |
| - make |
| - make install |
| |
| - name: Remove build files for Openvswitch {{ openvswitch_version }} |
| file: |
| path=/home/{{ ansible_user }}/{{ item }} |
| state=absent |
| with_items: |
| - "openvswitch-{{ openvswitch_version }}.tar.gz" |
| - "openvswitch-{{ openvswitch_version }}" |
| |
| - name: install Pipework |
| sudo: True |
| get_url: |
| url: "{{ docker_tools_pipework_exe_url }}" |
| dest: "{{ docker_tools_path }}/pipework" |
| force: yes |
| mode: "a+x" |
| |
| - name: Pull cord test container |
| become: yes |
| docker: |
| name: cord-test |
| image: "{{ docker.registry }}/cordtest/nose:{{ docker.image_version }}" |
| pull: always |
| state: absent |
| |
| - name: Pull test radius container |
| become: yes |
| docker: |
| name: cord-radius |
| image: "{{ docker.registry }}/cordtest/radius:{{ docker.image_version }}" |
| pull: always |
| state: absent |
| |
| - name: Pull test quagga container |
| become: yes |
| docker: |
| name: cord-quagga |
| image: "{{ docker.registry }}/cordtest/quagga:{{ docker.image_version }}" |
| pull: always |
| state: absent |
| |
| - name: Pull onosproject |
| become: yes |
| docker: |
| name: cord-test-onos |
| image: "{{ docker.registry }}/onosproject/onos:{{ docker.image_version }}" |
| pull: always |
| state: absent |