Merge "ansible: resize VNF image"
authorRoss Brattain <ross.b.brattain@intel.com>
Wed, 20 Sep 2017 20:44:43 +0000 (20:44 +0000)
committerGerrit Code Review <gerrit@opnfv.org>
Wed, 20 Sep 2017 20:44:43 +0000 (20:44 +0000)
1  2 
ansible/build_yardstick_image.yml

  
      - set_fact:
          image_fs_type: "{{ blkid_res.stdout.strip() }}"
+     - fail:
+         msg: "We only support ext4 image filesystems because we have to resize"
+       when: image_fs_type != "ext4"
+     - name: fsck the image filesystem
+       command: "e2fsck -y -f {{ image_first_partition_device  }}"
+     - name: resize filesystem to full partition size
+       command: resize2fs {{ image_first_partition_device }}
+     - name: fsck the image filesystem
+       command: "e2fsck -y -f {{ image_first_partition_device  }}"
  
      - name: make tmp disposable fstab
 -      command: mktemp fake_fstab.XXXXXXXXXX
 +      command: mktemp --tmpdir fake_fstab.XXXXXXXXXX
        register: mktemp_res
  
      - set_fact: