aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/testbed-setup/ansible/roles/tg
diff options
context:
space:
mode:
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg')
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/trex.yaml39
-rw-r--r--resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml35
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