diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-10-14 13:13:46 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-10-14 13:17:06 +0000 |
commit | f4604e91598ef6f914b7ce1ab57f7d44dc043460 (patch) | |
tree | a84a7fed9be17916408c4c4f34c6b284d28b6d1c /resources/tools/testbed-setup/ansible/roles/tg/tasks | |
parent | 1f2f456231931c0704c932499c285242005b32bf (diff) |
Ansible: Mellanox install
+ OFED
+ ibdev2netdev
- aligning few naming conventions
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I0dff28b2cd4bbc4753597366d9b03b497fa336c4
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg/tasks')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml | 39 | ||||
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml | 35 |
2 files changed, 37 insertions, 37 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml index 3cfcbea825..03f7d6da53 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml @@ -1,40 +1,41 @@ --- # file: roles/tg/tasks/trex.yaml -- name: Download TRex release archive +- name: T-Rex Install - Get Release Archive get_url: - url: '{{ trex.url }}/v{{ trex.version }}.tar.gz' + url: 'https://github.com/cisco-system-traffic-generator/trex-core/archive/v{{ trex.version }}.tar.gz' dest: '{{ trex.target_dir }}/trex-core-{{ trex.version }}.tar.gz' mode: 0644 - register: 'linux__trex_downloaded' + register: trex_downloaded tags: install-trex -- name: Ensure TRex directory exists +- name: T-Rex Install - Ensure Directory Exists file: path: '{{ trex.target_dir }}/trex-core-{{ trex.version }}' state: 'directory' - register: 'linux__trex_dir_created' + register: trex_dir_created tags: install-trex -- name: Extract TRex release archive - become: yes +- name: T-Rex Install - Extract Release Archive unarchive: + remote_src: true src: '{{ trex.target_dir }}/trex-core-{{ trex.version }}.tar.gz' dest: '{{ trex.target_dir }}/' - creates: '{{ trex.target_dir }}/trex-core-{{ trex.version }}/linux_dpdk' - remote_src: yes - when: 'linux__trex_dir_created' - register: 'linux__trex_extracted' + creates: '{{ trex.target_dir }}/trex-core-{{ trex.version }}/linux_dpdk/' + when: trex_dir_created + register: trex_extracted tags: install-trex -- name: Compile TRex release I - become: yes - shell: 'cd {{ trex.target_dir }}/trex-core-{{ trex.version }}/linux_dpdk/; ./b configure; ./b build' - when: 'linux__trex_extracted' +- name: T-Rex Install - Compile Release I + command: './b configure; ./b build' + args: + chdir: '{{ trex.target_dir }}/trex-core-{{ trex.version }}/linux_dpdk/' + when: trex_extracted tags: install-trex -- name: Compile TRex release II - become: yes - shell: 'cd {{ trex.target_dir }}/trex-core-{{ trex.version }}/scripts/ko/src; make; make install' - when: 'linux__trex_extracted' +- name: T-Rex Install - Compile Release II + command: 'make; make install' + args: + chdir: '{{ trex.target_dir }}/trex-core-{{ trex.version }}/scripts/ko/src' + when: trex_extracted tags: install-trex diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml index e7d22e1aa1..aee3761476 100644 --- a/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml @@ -1,41 +1,40 @@ --- # file: roles/tg/tasks/wrk.yaml -- name: Download WRK release archive +- name: WRK Install - Get Release Archive get_url: - url: '{{ wrk.url }}/{{ wrk.version }}.tar.gz' + url: 'https://github.com/wg/wrk/archive/{{ wrk.version }}.tar.gz' dest: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' mode: 0644 - register: 'linux__wrk_downloaded' + register: wrk_downloaded tags: install-wrk -- name: Ensure WRK directory exists +- name: WRK Install - Ensure Directory Exists file: path: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}' state: 'directory' - register: 'linux__wrk_dir_created' + register: wrk_dir_created tags: install-wrk -- name: Extract WRK release archive - become: yes +- name: WRK Install - Extract Release Archive unarchive: + remote_src: true src: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' dest: '{{ wrk.target_dir }}/' creates: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}/src' - remote_src: yes - when: 'linux__wrk_dir_created' - register: 'linux__wrk_extracted' + when: wrk_dir_created + register: wrk_extracted tags: install-wrk -- name: Compile WRK release - become: yes - shell: 'cd {{ wrk.target_dir }}/wrk-{{ wrk.version }}; make' - when: 'linux__wrk_extracted' - register: 'linux__wrk_compiled' +- name: WRK Install - Compile Release + command: 'make' + args: + chdir: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}' + when: wrk_extracted + register: wrk_compiled tags: install-wrk -- name: Move WRK binary - become: yes +- name: WRK Install - Move Binary command: 'mv {{ wrk.target_dir }}/wrk-{{ wrk.version }}/wrk /usr/local/bin/' - when: 'linux__wrk_compiled' + when: wrk_compiled tags: install-wrk |