Heatstack create: fix str/bytes error in NamedTemporaryFile.write()
[yardstick.git] / ansible / build_yardstick_image.yml
index bc57bcd..7f70987 100644 (file)
@@ -12,7 +12,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 ---
-- hosts: localhost
+- hosts: jumphost
 
   vars:
     boot_modes:
@@ -31,7 +31,8 @@
     workspace: "{{ lookup('env', 'workspace')|default('/tmp/workspace/yardstick', true) }}"
     raw_imgfile_basename: "yardstick-{{ release }}-server.raw"
   environment:
-    PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
+    - PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
+    - "{{ proxy_env }}"
 
   tasks:
     - group_by:
     - package: name=parted state=present
 
     - set_fact:
-        imgfile: "{{ workspace }}/yardstick-image.img"
+        imgfile: "{{ normal_image_file }}"
+      when: img_property == "normal"
+
+    - set_fact:
+        imgfile: "{{ nsb_image_file }}"
+      when: img_property == "nsb"
 
     - set_fact:
         mountdir: "{{ lookup('env', 'mountdir')|default('/mnt/yardstick', true) }}"
         nameserver_ip: "{{ ansible_dns.nameservers[0] }}"
         image_type: vm
 
-- name: include {{ img_modify_playbook }}
-  include: "{{ img_modify_playbook }}"
+- name: include ubuntu_server_cloudimg_modify.yml
+  include: ubuntu_server_cloudimg_modify.yml
+  when: img_property == "normal"
+
+- name: include ubuntu_server_cloudimg_modify_samplevnfs.yml
+  include: ubuntu_server_cloudimg_modify_samplevnfs.yml
+  when: img_property == "nsb"
 
 - hosts: localhost
   tasks: