ansible playbook bugfix 35/20735/4
authorwu.zhihui <wu.zhihui1@zte.com.cn>
Fri, 9 Sep 2016 05:16:09 +0000 (13:16 +0800)
committerzhihui wu <wu.zhihui1@zte.com.cn>
Sun, 11 Sep 2016 04:01:38 +0000 (04:01 +0000)
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>
14 files changed:
benchmarks/playbooks/cachebench.yaml
benchmarks/playbooks/dhrystone.yaml
benchmarks/playbooks/dpi.yaml
benchmarks/playbooks/fio.yaml
benchmarks/playbooks/git_proxy_pbook.yaml
benchmarks/playbooks/iperf.yaml
benchmarks/playbooks/netperf.yaml
benchmarks/playbooks/pktgen.yaml
benchmarks/playbooks/ramspeed.yaml
benchmarks/playbooks/ssl.yaml
benchmarks/playbooks/sys_info_pbook.yaml
benchmarks/playbooks/whetstone.yaml
func/env_setup.py
tests/output/hosts

index ebd0e17..ca9a709 100644 (file)
@@ -1,4 +1,3 @@
  - hosts: "{{ roles }}"
 
    tasks:
@@ -7,32 +6,44 @@
       shell: rm -rf  /usr/share/doc/phoronix-test-suite/
       shell: rm -rf  /usr/share/phoronix-test-suite
       shell: rm -rf  /root/photmp/
+
     - name: cleaning results
       file: path=/root/results state=absent
+
     - name: make direc
       file: path=/root/photmp/ state=directory
-    - name: Fetch Phornonix 
+
+    - name: Fetch Phornonix
       shell: cd /root/photmp/ && wget https://www.dropbox.com/s/5kks513ozxy7vvs/phoronix-suite.tar.gz
+
     - name: unarchive Phoronix
       shell: cd /root/photmp/ && tar -zxvf  phoronix-suite.tar.gz
+
     - name: Install Phornonix Dependencies
       shell: yum install php  php-xml php-client php-process -y
+
     - name: Install Phornonix
-      shell: cd /root/photmp/phoronix-test-suite-master/&&./install-sh    
+      shell: cd /root/photmp/phoronix-test-suite-master/&&./install-sh
+
     - name: batchSetup
       shell: phoronix-test-suite batch-setup
+
     - name: install
       shell: phoronix-test-suite batch-install cachebench
+
     - name: run
-      shell:  phoronix-test-suite batch-run cachebench
+      shell: phoronix-test-suite batch-run cachebench
+
     - name: making directory
       file: path=/root/results state=directory
+
     - name: copying result to temp directory
       shell: cp -r /var/lib/phoronix-test-suite/test-results/* /root/results/
+
     - name: registering files
       shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2
       register: files_to_copy
+
     - name: copy results
       fetch:  src=/root/results/{{item}} dest={{workingdir}}/{{Dest_dir}}/cachebench
-      with_items: files_to_copy.stdout_lines
-
+      with_items: "{{files_to_copy.stdout_lines}}"
index 82b24dd..d4fe07e 100644 (file)
@@ -1,23 +1,27 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: making dhrystone directory
-      file: path={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp state=directory
+      file: path={{workingdir}}/{{Dest_dir}}/dhrystone state=directory
+
     - name: making temporary dhrystone directory
       file: path={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp state=directory
 
  - hosts:  "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
-    - name: checking_home directory
-      shell: sudo echo $HOME
+    - name: checking home directory
+      shell: echo $HOME
       register: home_dir
 
     - name: cleaning tempT
       shell: sudo rm -rf $HOME/tempT
 
-    - name: cleaning_qtip_result
+    - name: cleaning qtip_result
       shell: sudo rm -rf $HOME/qtip_result
 
     - name: make directory
@@ -40,7 +44,8 @@
     - include: ./git_proxy_pbook.yaml
 
     - name: Clone unixbench
-      shell: git clone https://github.com/kdlucas/byte-unixbench.git $HOME/tempT
+      git: repo=https://github.com/kdlucas/byte-unixbench.git
+           dest=$HOME/tempT
 
     - name: make
       shell: sudo make --directory $HOME/tempT/UnixBench/
@@ -77,7 +82,7 @@
 
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp
-      with_items: files_to_copy.stdout_lines
+      with_items: "{{files_to_copy.stdout_lines}}"
 
     - name: registering log files
       shell: (cd $HOME/qtip_result/log/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
@@ -85,7 +90,7 @@
 
     - name: copying log results
       fetch:  src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp
-      with_items: copy_log_results.stdout_lines
+      with_items: "{{copy_log_results.stdout_lines}}"
 
     - name: cleaning tempT
       shell: sudo rm -rf $HOME/tempT
       shell: sudo rm -rf $HOME/qtip_result
 
 
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dhrystone/)
+
     - name: making_logs_folder
       shell: mkdir -p {{workingdir}}/{{Dest_dir}}/dhrystone/logs
+
     - name: extracting_log
       shell: ( find {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log"  | xargs cp -t {{workingdir}}/{{Dest_dir}}/dhrystone/logs)
+
     - name: removing dhrystone_temp
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp
index f4e6de8..6dae086 100644 (file)
@@ -1,19 +1,23 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: making dpi directory
       file: path={{workingdir}}/{{Dest_dir}}/dpi state=directory
+
     - name: making temporary whetstone directory
       file: path={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp state=directory
 
  - hosts: "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
     - name: echo
       shell: echo $USER
 
-    - name: checking_home directory
+    - name: checking home directory
       shell: echo $HOME
       register: home_dir
 
@@ -46,7 +50,8 @@
     - include: ./git_proxy_pbook.yaml
 
     - name: Clone nDPI
-      shell: cd $HOME/tempD && git clone https://github.com/ntop/nDPI.git
+      git: repo=https://github.com/ntop/nDPI.git
+           dest=$HOME/tempD
 
     - name: autogen
       shell: cd $HOME/tempD/nDPI && sudo ./autogen.sh
@@ -55,7 +60,7 @@
       shell: cd $HOME/tempD/nDPI && sudo ./configure
 
     - name: make
-      shell: cd  $HOME/tempD/nDPI && sudo make
+      shell: cd $HOME/tempD/nDPI && sudo make
 
     - name: Fetching Test_pcap file
       shell: cd $HOME/tempD/nDPI/example  &&  wget http://artifacts.opnfv.org/qtip/utilities/test.pcap
@@ -87,7 +92,7 @@
 
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp
-      with_items: files_to_copy.stdout_lines
+      with_items: "{{files_to_copy.stdout_lines}}"
 
     - name: registering log files
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
 
     - name: copying log results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp
-      with_items: copy_log_results.stdout_lines
+      with_items: "{{copy_log_results.stdout_lines}}"
 
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dpi/)
+
     - name: making_logs_folder
       shell: mkdir -p {{workingdir}}/{{Dest_dir}}/dpi/logs
+
     - name: extracting_log
       shell: ( find {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp/ -name "*.log"  | xargs cp -t {{workingdir}}/{{Dest_dir}}/dpi/logs)
+
     - name: removing dpi_temp
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp
index 3de237f..813dc41 100644 (file)
@@ -1,8 +1,11 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: making fio  directory
       file: path={{workingdir}}/{{Dest_dir}}/fio state=directory
+
     - name: making temporary fio directory
       file: path={{workingdir}}/{{Dest_dir}}/fio/fio_temp state=directory
 
@@ -10,8 +13,9 @@
  - hosts: "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
-    - name: checking_home directory
+    - name: checking home directory
       shell: echo $HOME
       register: home_dir
 
@@ -72,7 +76,7 @@
 
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/fio/fio_temp
-      with_items: files_to_copy.stdout_lines
+      with_items: "{{files_to_copy.stdout_lines}}"
 
     - name: registering log files
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
 
     - name: copying log results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/fio/fio_temp
-      with_items: copy_log_results.stdout_lines
+      with_items: "{{copy_log_results.stdout_lines}}"
 
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/fio/fio_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/fio/)
+
     - name: making_logs_folder
       shell: mkdir -p {{workingdir}}/{{Dest_dir}}/fio/logs
+
     - name: extracting_log
       shell: ( find {{workingdir}}/{{Dest_dir}}/fio/fio_temp/ -name "*.log"  | xargs cp -t {{workingdir}}/{{Dest_dir}}/fio/logs)
+
     - name: removing fio_log
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/fio/fio_temp
 
index 6d155a7..5cb6f45 100644 (file)
@@ -1,4 +1,3 @@
-
 #git
 - name: set git proxy(http)
   shell: "git config --global http.proxy {{ http_proxy }}"
index de1e5a4..b6fd75c 100644 (file)
@@ -1,12 +1,15 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
-   tasks:
+   gather_facts: no
 
+   tasks:
     - name: getting directory
       shell: sudo echo $PWD
       register: qtip_dir
+
     - name: making Iperf directory
       file: path={{workingdir}}/{{Dest_dir}}/iperf state=directory
+
     - name: making temporary iperf directory
       file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp state=directory
 
@@ -14,6 +17,7 @@
  - hosts: "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
     - name: Rolename
       set_fact:
@@ -31,7 +35,7 @@
     - name: echo
       shell: echo index_var
 
-    - name: checking_home directory
+    - name: checking home directory
       shell: echo $HOME
       register: home_dir
 
@@ -44,7 +48,7 @@
     - name: making Iperf temporary directory
       shell: sudo mkdir $HOME/iperf
 
-    - name: making  results temporary directory
+    - name: making results temporary directory
       shell: sudo mkdir $HOME/qtip_result
 
     - include: ./sys_proxy_pbook.yaml
       when: rolename =="2-host" and "{{ip2}}" == ''
 
 
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: Rolename
       set_fact:
         rolename: "{{role}}"
         when: role is defined
+
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/)
       when: rolename == "2-host"
+
     - name: making_logs_folder
       shell: mkdir -p {{workingdir}}/{{Dest_dir}}/iperf/logs
+
     - name: extracting_log
       shell: ( find {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.log"  | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/logs)
       when: rolename == "2-host"
+
     - name: removing iperf_raw file
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_raw.json
       when: rolename == "2-host"
+
     - name: removing iperf_temp
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp
index 30f4b57..a07752c 100644 (file)
@@ -1,12 +1,15 @@
- - 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 Netperf directory
       file: path={{workingdir}}/{{Dest_dir}}/netperf state=directory
+
     - name: making temporary netperf directory
       file: path={{workingdir}}/{{Dest_dir}}/netperf/netperf_temp state=directory
 
     - name: Get Hostname
       shell: echo $HOSTNAME
       register: hostID
-    - name: checking_home directory
+
+    - name: checking home directory
       shell: echo $HOME
       register: home_dir
+
     - name: cleaning
       shell: rm -rf $HOME/netperf
+
     - name: cleaning previous results
       shell: rm -rf $HOME/qtip_result
+
     - name: making netperf temporary directory
       shell: mkdir $HOME/netperf
+
     - name: making  results temporary directory
       shell: mkdir $HOME/qtip_result
 
     - name: Fetching netperf
       shell: wget ftp://ftp.netperf.org/netperf/netperf-2.7.0.tar.gz
       when: ansible_os_family == "RedHat"
+
     - name: Extracting Netperf
       shell: tar -xvf netperf-2.7.0.tar.gz
+
     - name: configuring netperf
       shell: cd $HOME/netperf-2.7.0  && ./configure
+
     - name: Making Netperf
       shell: cd $HOME/netperf-2.7.0 && make
+
     - name: Installing Netperf
       shell: cd $HOME/netperf-2.7.0 && make install
 
     - name: Files to Copy
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2
       register: files_to_copy
+
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/netperf/netperf_temp
-      with_items: files_to_copy.stdout_lines
- - hosts: 127.0.0.1
+      with_items: "{{files_to_copy.stdout_lines}}"
+
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: Rolename
       set_fact:
         rolename: "{{role}}"
         when: role is defined
+
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/netperf/netperf_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/netperf/)
       when: rolename == "2-host"
+
     - name: removing netperf_temp
-      shell: rm -rf {{workingdir}}/{{Dest_dir}}/netperf/netperf_temp
\ No newline at end of file
+      shell: rm -rf {{workingdir}}/{{Dest_dir}}/netperf/netperf_temp
index 466fb8e..f466129 100644 (file)
@@ -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:
     - 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'
index 096c732..3fb78cb 100644 (file)
@@ -1,8 +1,11 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: making ramspeed  directory
       file: path={{workingdir}}/{{Dest_dir}}/ramspeed state=directory
+
     - name: making temporary ramspeed directory
       file: path={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp state=directory
 
@@ -10,8 +13,9 @@
  - hosts:  "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
-    - name: checking_home directory
+    - name: checking home directory
       shell: echo $HOME
       register: home_dir
 
@@ -77,7 +81,7 @@
 
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp
-      with_items: files_to_copy.stdout_lines
+      with_items: "{{files_to_copy.stdout_lines}}"
 
     - name: registering log files
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
 
     - name: copying log results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp
-      with_items: copy_log_results.stdout_lines
+      with_items: "{{copy_log_results.stdout_lines}}"
 
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ramspeed/)
+
     - name: making_logs_folder
       shell: mkdir -p {{workingdir}}/{{Dest_dir}}/ramspeed/logs
+
     - name: extracting_log
       shell: ( find {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.log"  | xargs cp -t {{workingdir}}/{{Dest_dir}}/ramspeed/logs)
+
     - name: removing ramspeed_log
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp
index fcb7585..55e0af9 100644 (file)
@@ -1,15 +1,20 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: making ssl directory
       file: path={{workingdir}}/{{Dest_dir}}/ssl state=directory
+
     - name: making temporary ssl directory
       file: path={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp state=directory
+
  - hosts: "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
-    - name: checking_home directory
+    - name: checking home directory
       shell: sudo echo $HOME
       register: home_dir
 
           network: false
 
     - name: Installing OpenSSL dependencies when CentOS
-      shell: sudo yum install git  wget gcc patch  perl-Time-HiRes autofconf automake libpcap-devel libtool -y
+      shell: sudo yum install git wget gcc patch perl-Time-HiRes autofconf automake libpcap-devel libtool -y
       when: ansible_os_family == "RedHat"
 
     - name: Installing OpenSSL dependencies when Ubuntu
-      shell: sudo apt-get  install git gcc wget   perl autoconf automake libpcap-dev libtool -y
+      shell: sudo apt-get install git gcc wget  perl autoconf automake libpcap-dev libtool -y
       when: ansible_os_family == "Debian"
 
     - name: Fetching OpenSSL
@@ -59,7 +64,6 @@
     - name: Benchmaring AES-128-cbc cipher encryption  throughput
       shell: cd $HOME/Open_SSL/openssl-1.0.2f/apps  &&  sudo ./openssl speed -evp aes-128-cbc >> $HOME/qtip_result/AES-128-CBC_dump
 
-
     - name: Fetching result transformation script
       copy: src=./result_transform/ssl/ssl_transform.py dest={{home_dir.stdout}}/qtip_result
 
@@ -78,7 +82,7 @@
 
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp
-      with_items: files_to_copy.stdout_lines
+      with_items: "{{files_to_copy.stdout_lines}}"
 
     - name: registering log files
       shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
 
     - name: copying log results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp
-      with_items: copy_log_results.stdout_lines
-
+      with_items: "{{copy_log_results.stdout_lines}}"
 
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: echo
       shell: echo $PWD
+
     - name: extracting_json
       shell: ( find {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ssl/)
+
     - name: making_logs_folder
       shell: mkdir -p {{workingdir}}/{{Dest_dir}}/ssl/logs
+
     - name: extracting_log
       shell: ( find {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp/ -name "*.log"  | xargs cp -t {{workingdir}}/{{Dest_dir}}/ssl/logs)
+
     - name: removing ssl_temp
       shell: rm -rf {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp
index bc47423..cfcad11 100644 (file)
@@ -40,8 +40,3 @@
    - name: collecting system information for network test  cases
      shell: cd $HOME/qtip_result && sudo python info_collect.py n
      when: network
-
-
-
-
-
index efe78cf..98280e6 100644 (file)
@@ -1,5 +1,7 @@
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: making whetstone directory
       file: path={{workingdir}}/{{Dest_dir}}/whetstone state=directory
@@ -10,6 +12,7 @@
  - hosts: "{{role}}"
    become: yes
    remote_user: "{{username}}"
+
    tasks:
     - name: storing_home
       shell: echo $HOME
@@ -41,7 +44,8 @@
     - include: ./git_proxy_pbook.yaml
 
     - name: Clone unixbench
-      shell: git clone https://github.com/kdlucas/byte-unixbench.git $HOME/tempT
+      git: repo=https://github.com/kdlucas/byte-unixbench.git
+           dest=$HOME/tempT
 
     - name: make
       shell: sudo make --directory $HOME/tempT/UnixBench/
@@ -79,7 +83,7 @@
 
     - name: copy results
       fetch:  src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp
-      with_items: files_to_copy.stdout_lines
+      with_items: "{{files_to_copy.stdout_lines}}"
 
     - name: registering log files
       shell: (cd $HOME/qtip_result/log/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2
@@ -87,7 +91,7 @@
 
     - name: copying log results
       fetch:  src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp
-      with_items: copy_log_results.stdout_lines
+      with_items: "{{copy_log_results.stdout_lines}}"
 
     - name: cleaning tempT
       shell: sudo rm -rf $HOME/tempT
     - name: cleaning_qtip_result
       shell: sudo rm -rf $HOME/qtip_result
 
-
- - hosts: 127.0.0.1
+ - hosts: localhost
    connection: local
+   gather_facts: no
+
    tasks:
     - name: extracting_json
       shell: ( find  {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/whetstone/)
index 96f984c..f6b1d43 100644 (file)
@@ -54,6 +54,8 @@ class Env_setup:
             num = len(role[k])
             for x in range(num):
                 f_name_2.write(role[k][x] + '\n')
+        f_name_2.write('[localhost]\n')
+        f_name_2.write('127.0.0.1\n')
         f_name_2.close()
 
     @staticmethod
index 9b47df0..b380e47 100644 (file)
@@ -1,3 +1,5 @@
 [host]
 10.20.0.29
 10.20.0.28
+[localhost]
+127.0.0.1