mirror-image updates

  * Check exit code from salt states

EME-372

Change-Id: Ie92f0487d2ee353488925f5129479492895118e0
diff --git a/mirror-image/scripts/salt.sh b/mirror-image/scripts/salt.sh
index 613352a..9655ec0 100644
--- a/mirror-image/scripts/salt.sh
+++ b/mirror-image/scripts/salt.sh
@@ -1,16 +1,19 @@
 #!/bin/bash -xe
 
+SALT_OPTS="-l debug -t 10 --retcode-passthrough --no-color"
+
 echo "deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO}" > /etc/apt/sources.list.d/mcp_salt.list
 apt-get update
 apt-get install salt-formula* -y
 salt-call saltutil.refresh_pillar
 salt-call saltutil.sync_all
-salt-call -t 5 --retcode-passthrough --no-color state.sls salt
-salt-call -t 5 --retcode-passthrough --no-color state.sls linux.system.repo,linux.system.directory,linux.system.package
-salt-call -t 5 --retcode-passthrough --no-color state.sls linux.system.file
-salt-call -t 5 --retcode-passthrough --no-color state.sls docker.host
-salt-call -t 5 --retcode-passthrough --no-color state.sls docker exclude=docker.client.registry
+
+salt-call ${SALT_OPTS} state.sls salt
+salt-call ${SALT_OPTS} state.sls linux.system.repo,linux.system.directory,linux.system.package
+salt-call ${SALT_OPTS} state.sls linux.system.file
+salt-call ${SALT_OPTS} state.sls docker.host
+salt-call ${SALT_OPTS} state.sls docker exclude=docker.client.registry
 sleep 120
-salt-call -t 5 --retcode-passthrough --no-color state.sls linux.network
-salt-call -t 5 --retcode-passthrough --no-color state.sls nginx
-salt-call -t 5 --retcode-passthrough --no-color state.sls maas.mirror
+salt-call ${SALT_OPTS} state.sls linux.network
+salt-call ${SALT_OPTS} state.sls nginx
+salt-call ${SALT_OPTS} state.sls maas.mirror