1 # Copyright (c) 2017 Intel Corporation.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
17 ansible_python_interpreter: "/usr/bin/env python"
18 # needed for virtualenv
19 NSB_INSTALL_DIR: /root/nsb_install
20 INSTALL_BIN_PATH: /opt/nsb_bin
21 #TREX_DOWNLOAD: "https://trex-tgn.cisco.com/trex/release/v2.05.tar.gz"
23 TREX_DOWNLOAD: "https://trex-tgn.cisco.com/trex/release/{{ TREX_VERSION }}.tar.gz"
27 url: "{{ TREX_DOWNLOAD }}"
28 dest: "{{ NSB_INSTALL_DIR }}"
29 checksum: "sha256:b9620341e552d2ef71d5ffa39ef92f12a1186836c250390db77bd7228497b91c"
32 src: "{{ NSB_INSTALL_DIR }}/{{ TREX_DOWNLOAD|basename }}"
33 dest: "{{ NSB_INSTALL_DIR }}"
36 - file: path="{{ INSTALL_BIN_PATH }}/trex" state=absent
37 - file: path="{{ INSTALL_BIN_PATH }}/trex" state=directory
39 - command: mv "{{ NSB_INSTALL_DIR }}/{{ TREX_DOWNLOAD|basename|regex_replace('\.tar.gz', '') }}" "{{ INSTALL_BIN_PATH }}/trex/scripts"
41 - file: path="{{ INSTALL_BIN_PATH }}/trex/scripts/automation/trex_control_plane/stl/__init__.py" state=touch
43 - command: cp "{{ INSTALL_BIN_PATH }}/trex/scripts/dpdk_nic_bind.py" "{{ INSTALL_BIN_PATH }}"
45 - name: add scripts to PYTHONPATH
47 dest: /etc/environment
48 regexp: "^PYTHONPATH="
49 line: "PYTHONPATH={{ INSTALL_BIN_PATH }}/trex/scripts/automation/trex_control_plane:{{ INSTALL_BIN_PATH }}/trex/scripts/automation/trex_control_plane/stl:{{ NSB_INSTALL_DIR }}/yardstick"