aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/qtip-workspace/files
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-22 10:29:12 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-22 10:29:12 +0800
commit385aa6e98428982802ea14a4f6a5a32d3f78c643 (patch)
tree8e85d85e927a5eb3d582f87110fb3875f17ab42d /resources/ansible_roles/qtip-workspace/files
parentbb208192872c841cafdb27769f3680a56b18fa65 (diff)
Organize results in folder named with pod and current date
Change-Id: I0882fb4548c3c3a6a72c6f752f8074e553ee3748 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles/qtip-workspace/files')
-rw-r--r--resources/ansible_roles/qtip-workspace/files/defaults/run.yml12
1 files changed, 11 insertions, 1 deletions
diff --git a/resources/ansible_roles/qtip-workspace/files/defaults/run.yml b/resources/ansible_roles/qtip-workspace/files/defaults/run.yml
index d0f452aa..31969281 100644
--- a/resources/ansible_roles/qtip-workspace/files/defaults/run.yml
+++ b/resources/ansible_roles/qtip-workspace/files/defaults/run.yml
@@ -13,6 +13,12 @@
# - test condition
# - performance metrics
+- hosts: localhost
+ tasks:
+ - name: setting result directory name
+ set_fact:
+ qtip_results_base: "{{ qtip_results }}/{{ pod_name }}-{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}"
+
- hosts: compute
pre_tasks:
@@ -20,9 +26,13 @@
- name: check ssh connection
ping:
+ - name: overriding result directory name
+ set_fact:
+ qtip_results: "{{ hostvars['localhost']['qtip_results_base']}}/{{ inventory_hostname }}"
+
- name: create result directory
file:
- path: "{{ qtip_results }}/{{ inventory_hostname }}"
+ path: "{{ qtip_results }}"
state: directory
delegate_to: localhost