summaryrefslogtreecommitdiffstats
path: root/benchmarks/playbooks/pktgen.yaml
diff options
context:
space:
mode:
authorwu.zhihui <wu.zhihui1@zte.com.cn>2016-09-09 13:16:09 +0800
committerzhihui wu <wu.zhihui1@zte.com.cn>2016-09-11 04:01:38 +0000
commit43501355cf6974ee9ee36ca22c1113d80acffc7d (patch)
tree2236e14f13b2afd990aa26e0dd24d55052bed377 /benchmarks/playbooks/pktgen.yaml
parent3a987ca748287d250d7975a853222917f001469a (diff)
ansible playbook bugfix
According the qtip ci results, make these bugfixs. 1. skipping: no hosts matched This used to work in Ansible 1.9.x with 127.0.0.1;But does not work in Asible 2.x solved: add 127.0.0.1 as localhost in ./data/hosts 2. Using bare variables is deprecated. solved: update playbook 3. use git module 4. To save time, turning Off Facts on localhost. Since https://gerrit.opnfv.org/gerrit/#/c/20661/ is under codereview, for qtip ci job, I temporarily modify function write_to_file() in env_setup.py. Change-Id: I71a08ebf87cd8c8d851a3f8f760e29e8725f0e0f Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
Diffstat (limited to 'benchmarks/playbooks/pktgen.yaml')
-rw-r--r--benchmarks/playbooks/pktgen.yaml15
1 files changed, 12 insertions, 3 deletions
diff --git a/benchmarks/playbooks/pktgen.yaml b/benchmarks/playbooks/pktgen.yaml
index 466fb8e9..f466129b 100644
--- a/benchmarks/playbooks/pktgen.yaml
+++ b/benchmarks/playbooks/pktgen.yaml
@@ -1,17 +1,21 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
connection: local
- tasks:
+ gather_facts: no
+ tasks:
- name: getting directory
shell: echo $PWD
register: qtip_dir
+
- name: making pktgen directory
file: path={{workingdir}}/{{Dest_dir}}/pktgen state=directory
+
- name: making temporary pktgen directory
file: path={{workingdir}}/{{Dest_dir}}/pktgen/pktgen_temp state=directory
- hosts: "{{role}}"
+
tasks:
- name: Rolename
set_fact:
@@ -21,18 +25,23 @@
- name: IPTABLE Setup
shell: iptables -F
when: rolename == '1-server'
+
- name: iptables
shell: sudo iptables -A INPUT -p udp --dport 1000 -j DROP
when: rolename == '1-server'
+
- name: run pktgen
shell: bash pktgen.sh {{privateip1}} 1 {{packetsize}} {{duration}} >> .json
when: rolename == '2-host'
+
- hosts: "{{role}}"
+
tasks:
- name: Rolename
set_fact:
rolename: "{{role}}"
when: role is defined
+
- name: Get server packetsize
shell: iptables -L -vnx >> pktgenServer{{privateip1}}.txt
- when: rolename == '1-server' \ No newline at end of file
+ when: rolename == '1-server'