aboutsummaryrefslogtreecommitdiffstats
path: root/resources/ansible_roles/nDPI
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-25 16:46:51 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-25 16:58:31 +0800
commitd158e53addc56a9f92ecf0947eda4110c23da8ee (patch)
treece0bbffe52abe0b2e0bc91f6cc9638ed1477e413 /resources/ansible_roles/nDPI
parent2189e3bfdf1d250fa1201f89249745d4d6aab7f0 (diff)
Organize common tasks under qtip-common role
Change-Id: I8592efdac7e6c2161eb7cb1b36d023697ebe7ad4 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/ansible_roles/nDPI')
-rw-r--r--resources/ansible_roles/nDPI/meta/main.yml14
-rw-r--r--resources/ansible_roles/nDPI/tasks/main.yml8
2 files changed, 16 insertions, 6 deletions
diff --git a/resources/ansible_roles/nDPI/meta/main.yml b/resources/ansible_roles/nDPI/meta/main.yml
new file mode 100644
index 00000000..b035a9a9
--- /dev/null
+++ b/resources/ansible_roles/nDPI/meta/main.yml
@@ -0,0 +1,14 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+---
+
+allow_duplicates: yes
+dependencies:
+- { role: qtip-common, basename: nDPI }
diff --git a/resources/ansible_roles/nDPI/tasks/main.yml b/resources/ansible_roles/nDPI/tasks/main.yml
index c007a613..6dc7bf9d 100644
--- a/resources/ansible_roles/nDPI/tasks/main.yml
+++ b/resources/ansible_roles/nDPI/tasks/main.yml
@@ -49,10 +49,6 @@
chdir: "{{ workdir }}/nDPI-1.6/example/"
register: ndpi_out
-- name: generating log filename
- set_fact:
- logfile: "{{ qtip_results }}/nDPI.log"
-
- name: saving output to log
copy:
content: "{{ ndpi_out.stdout }}"
@@ -66,12 +62,12 @@
# nDPI throughput: 1.46 M pps / 13.69 Gb/sec
# TODO(yujunz) convert "M pps" and "K pps" to number
- 'nDPI throughput:\s+?(?P<dpi_pps>\d+.\d+.*) \/ (?P<dpi_bps>\d+.\d+.*)$'
- export_to: "{{ qtip_results }}/dpi_metrics.json"
+ dest: "{{ output }}/metrics.json"
register: dpi_metrics
delegate_to: localhost
- name: create dpi report
template:
src: dpi-metrics.j2
- dest: "{{ qtip_results }}/dpi-metrics"
+ dest: "{{ output }}/dpi-metrics"
delegate_to: localhost