VOL-241 VOL-239 VOL-257 VOL-258 This update solves multiple problems
and cleans up the ansible tree somewhat.
VOL-241 Removes the error messages during dependent software installation
VOL-239 Removes the dependency on apt-get -y -f
VOL-257 Adds a config file to specify the docker containers required for
        a production deployment of vOLT-HA
VOL-258 Adds error checking after the voltha VM executes the vOLT-HA
        build to stop on errors rather than continuing and having the
        installer fail much later when docker containers are missing.
- General cleanup of the ansible tree.
  - Removal of ansible centos conditionals since they're not required.
  - Removal of the check for puppet and chef, not required.
- Adds a cleanup script that will remove temporary files added
  during an install so they don't get submitted to the repo by
  accident.

Note there are lots of commented out lines in the ansible scripts.
These will be removed in a subsequent update.

Change-Id: I92da352408dbfed1a05d13a1e10003f169be6a66
diff --git a/install/CreateInstaller.sh b/install/CreateInstaller.sh
index 8816db6..7f06c09 100755
--- a/install/CreateInstaller.sh
+++ b/install/CreateInstaller.sh
@@ -2,6 +2,7 @@
 
 
 iVmName="vInstaller"
+vVmName="voltha_voltha"
 baseImage="Ubuntu1604LTS"
 iVmNetwork="vagrant-libvirt"
 installerArchive="installer.tar.bz2"
@@ -73,6 +74,7 @@
 	sed -i -e '/^#/!d' install.cfg
 	# Set the insecure registry configuration based on the installer hostname
 	echo -e "${lBlue}Set up the inescure registry hostname ${lCyan}vinstall${uId}${NC}"
+	sed -i -e '/docker_push_registry/s/.*/docker_push_registry: "vinstall:5000"/' ansible/group_vars/all
 	echo '{' > ansible/roles/voltha/templates/daemon.json
 	echo '"insecure-registries" : ["vinstall:5000"]' >> ansible/roles/voltha/templates/daemon.json
 	echo '}' >> ansible/roles/voltha/templates/daemon.json
@@ -184,12 +186,32 @@
 if [ -z "$vVM" ]; then
 	if [ $# -eq 1 -a "$1" == "test" ]; then
 		./BuildVoltha.sh $1
+		rtrn=$#
 	else
 		# Default to installer mode 
 		./BuildVoltha.sh install
+		rtrn=$#
+	fi
+	if [ $rtrn -ne 0 ]; then
+		echo -e "${red}Voltha build failed!! ${yellow}Please review the log and correct${lBlue} is running${NC}"
+		exit 1
 	fi
 fi
 
+# Extract all the image names and tags from the running voltha VM
+# No Don't do this, it's too error prone if the voltha VM is not 
+# built correctly, going with a static list for now.
+#echo -e "${lBlue}Extracting the docker image list from the voltha VM${NC}"
+#volIpAddr=`virsh domifaddr $vVmName${uId} | tail -n +3 | awk '{ print $4 }' | sed -e 's~/.*~~'`
+#ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ../.vagrant/machines/voltha${uId}/libvirt/private_key vagrant@$volIpAddr "docker image ls" > images.tmp
+#cat images.tmp | grep -v 5000 | tail -n +2 | awk '{printf("  - %s:%s\n", $1, $2)}' > image-list.cfg
+#rm -f images.tmp
+#sed -i -e '/voltha_containers:/,$d' ansible/group_vars/all
+#echo "voltha_containers:" >> ansible/group_vars/all
+echo -e "${lBlue}Set up the docker image list from ${yellow}containers.cfg${NC}"
+sed -i -e '/voltha_containers:/,$d' ansible/group_vars/all
+cat containers.cfg >> ansible/group_vars/all
+
 # Install python which is required for ansible
 echo -e "${lBlue}Installing python${NC}"
 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i key.pem vinstall@$ipAddr sudo apt-get update