diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-08-14 12:30:06 +0000 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2019-08-14 14:32:02 +0000 |
commit | 37a9451377f7239365b5af778b8072d1585a2d2a (patch) | |
tree | 2e413a56bf65012245c46efc950e97515bce74fd /resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml | |
parent | be39339d5bf121d718623885d05848e50d466347 (diff) |
Move: WRK installation into ansible
- Remove ability to install from framework.
- Control via ansible with other dependencies.
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I5fd0ca18b4f76c30b6c28b4dcd15e538e01cb315
Diffstat (limited to 'resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml')
-rw-r--r-- | resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml new file mode 100644 index 0000000000..1da45fb4b4 --- /dev/null +++ b/resources/tools/testbed-setup/ansible/roles/tg/tasks/wrk.yaml @@ -0,0 +1,33 @@ +--- +# file: roles/tg/tasks/wrk.yaml + +- name: Download WRK release archive + get_url: + url: '{{ wrk.url }}/{{ wrk.version }}.tar.gz' + dest: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' + mode: 0644 + register: 'linux__wrk_downloaded' + tags: install-wrk + +- name: Extract WRK release archive + become: yes + unarchive: + src: '{{ wrk.target_dir }}/{{ wrk.version }}.tar.gz' + dest: '{{ wrk.target_dir }}/wrk-{{ wrk.version }}' + remote_src: yes + when: 'linux__wrk_downloaded' + register: 'linux__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' + tags: install-wrk + +- name: Move WRK binary + become: yes + command: 'mv {{ wrk.target_dir }}/wrk-{{ wrk.version }}/wrk /usr/local/bin/' + when: 'linux__wrk_compiled' + tags: install-wrk |