ansible: fix corrupt /etc/fstab boot error 45/41045/2
authorRoss Brattain <ross.b.brattain@intel.com>
Tue, 5 Sep 2017 07:28:48 +0000 (00:28 -0700)
committerRoss Brattain <ross.b.brattain@intel.com>
Tue, 5 Sep 2017 07:39:28 +0000 (00:39 -0700)
Change-Id: I71fdef5deff75cad434bf19f0a7e507c1dcc4ed3
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
ansible/build_yardstick_image.yml

index 8fbad53..5f91585 100644 (file)
         image_fs_type: "{{ blkid_res.stdout.strip() }}"
 
     - name: make tmp disposable fstab
-      command: mktemp fake_fstab.XXXXXXXXXX
+      command: mktemp --tmpdir fake_fstab.XXXXXXXXXX
       register: mktemp_res
 
     - set_fact:
         name: "{{ mountdir }}"
         # fstype is required
         fstype: "{{ image_fs_type }}"
+        # !!!!!!! this is required otherwise we add entries to /etc/fstab
+        # and prevent the system from booting
+        fstab: "{{ fake_fstab }}"
         state: mounted
 
     - name: mount chroot /proc
         src: none
         name: "{{ mountdir }}/proc"
         fstype: proc
+        # !!!!!!! this is required otherwise we add entries to /etc/fstab
+        # and prevent the system from booting
+        fstab: "{{ fake_fstab }}"
         state: mounted
 
     - name: if arm copy qemu-aarch64-static into chroot