summaryrefslogtreecommitdiffstats
path: root/benchmarks/playbooks/pktgen.yaml
blob: 04a0066e87adc1df6e880651d9d145f52f596ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
 - hosts: 127.0.0.1
   connection: local
   tasks: 

    - name: getting directory
      shell: echo $PWD
      register: qtip_dir
    - name: making pktgen directory
      file: path=../../{{Dest_dir}}/pktgen state=directory
    - name: making temporary pktgen directory
      file: path=../../{{Dest_dir}}/pktgen/pktgen_temp state=directory


 - hosts: "{{role}}"
   tasks:
    - name: Rolename
      set_fact:
        rolename: "{{role}}"
        when: role is defined
    
    - 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'