From 2251057b0222464398ae86d92b5904f418af6ed8 Mon Sep 17 00:00:00 2001
From: Ross Brattain <ross.b.brattain@intel.com>
Date: Tue, 5 Sep 2017 00:28:48 -0700
Subject: ansible: fix corrupt /etc/fstab boot error

Change-Id: I71fdef5deff75cad434bf19f0a7e507c1dcc4ed3
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
---
 ansible/build_yardstick_image.yml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/ansible/build_yardstick_image.yml b/ansible/build_yardstick_image.yml
index 8fbad5337..5f9158576 100644
--- a/ansible/build_yardstick_image.yml
+++ b/ansible/build_yardstick_image.yml
@@ -126,7 +126,7 @@
         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:
@@ -138,6 +138,9 @@
         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
@@ -145,6 +148,9 @@
         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
-- 
cgit