diff options
Diffstat (limited to 'ansible/build_yardstick_image.yml')
-rw-r--r-- | ansible/build_yardstick_image.yml | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml index 35d9da45e..45ef94e98 100644 --- a/ansible/build_yardstick_image.yml +++ b/ansible/build_yardstick_image.yml @@ -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: @@ -29,10 +29,10 @@ sha256sums_url: "{{ lookup('env', 'SHA256SUMS_URL')|default('https://' ~ host ~ '/' ~ sha256sums_path, true) }}" workspace: "{{ lookup('env', 'workspace')|default('/tmp/workspace/yardstick', true) }}" - imgfile: "{{ workspace }}/yardstick-image.img" 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: @@ -41,6 +41,9 @@ - package: name=parted state=present - set_fact: + imgfile: "{{ workspace }}/yardstick-image.img" + + - set_fact: mountdir: "{{ lookup('env', 'mountdir')|default('/mnt/yardstick', true) }}" - set_fact: @@ -184,14 +187,6 @@ mode: 0755 when: "target_os == 'Ubuntu'" - - name: set img_modify_playbook - set_fact: - img_modify_playbook: ubuntu_server_cloudimg_modify.yml - - - debug: - var: img_modify_playbook - verbosity: 2 - - name: add chroot as host add_host: name: "{{ mountdir }}" @@ -205,6 +200,11 @@ - name: include {{ img_modify_playbook }} include: "{{ img_modify_playbook }}" +- hosts: localhost + tasks: + - name: convert image to image file + command: "qemu-img convert -c -o compat=0.10 -O qcow2 {{ raw_imgfile }} {{ imgfile }}" + - name: run post build tasks include: post_build_yardstick_image.yml @@ -212,4 +212,4 @@ tasks: - debug: - msg: "yardstick image = {{ raw_imgfile }}" + msg: "yardstick image = {{ imgfile }}" |