diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-22 22:19:27 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-04-24 08:51:49 +0800 |
commit | e579659699b4571a69990efc5861914e4701a4f6 (patch) | |
tree | 25a1e3cb196c457b39a6e22b57ce0754361f6a21 /resources/ansible_roles/ramspeed/tasks | |
parent | b9ac93be6587754b1e7ddc7c6bdafbf1f50fa50c (diff) |
Unify workdir
- use role variable `workdir`
- download dependencies to remote workdir with checksum
Change-Id: I2a7991e014e365fec532520c2b57a3fe480914d8
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles/ramspeed/tasks')
-rw-r--r-- | resources/ansible_roles/ramspeed/tasks/main.yml | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/resources/ansible_roles/ramspeed/tasks/main.yml b/resources/ansible_roles/ramspeed/tasks/main.yml index 2616cccc..2ecf4279 100644 --- a/resources/ansible_roles/ramspeed/tasks/main.yml +++ b/resources/ansible_roles/ramspeed/tasks/main.yml @@ -9,35 +9,42 @@ - name: making ramspeed working directory file: - path: "{{ cwd }}" + path: "{{ workdir }}" state: directory tags: [setup] -- name: download ramspeed/ramsmp - unarchive: - src: http://www.alasir.com/software/ramspeed/ramsmp-3.5.0.tar.gz - dest: "{{ cwd }}" - remote_src: yes +- name: downloading ramsmp + get_url: + url: http://www.alasir.com/software/ramspeed/ramsmp-3.5.0.tar.gz + dest: "{{ workdir }}" + checksum: "sha256:39fb15493fb3c293575746d56f6ab9faaa1d876d8b1f0d8e5a4042d2ace95839" tags: [setup] +- name: extracting ramsmp + # TODO(yujunz) unarchive may not work with long path (local: macOS, workdir: /root/qtip-workdir-20170423-0836/) + command: "tar zxf ramsmp-3.5.0.tar.gz" + args: + chdir: "{{ workdir }}" + creates: ramsmp-3.5.0 + - name: build ramsmp command: ./build.sh args: - chdir: "{{ cwd }}/ramsmp-3.5.0" + chdir: "{{ workdir }}/ramsmp-3.5.0" creates: ramsmp tags: [setup] - name: intmem benchmarking command: ./ramsmp -b 3 -l 5 -p 1 args: - chdir: "{{ cwd }}/ramsmp-3.5.0" + chdir: "{{ workdir }}/ramsmp-3.5.0" register: ramsmp_intmem_out tags: [run] - name: floatmem benchmarking command: ./ramsmp -b 6 -l 5 -p 1 args: - chdir: "{{ cwd }}/ramsmp-3.5.0" + chdir: "{{ workdir }}/ramsmp-3.5.0" register: ramsmp_floatmem_out tags: [run] |