Refresh ubuntu-14.04

Closes-Bug: PROD-21397 (PROD:21397)

Change-Id: I5a7717e26c016bd5a89d9cb1031dca7c14299050
diff --git a/ubuntu-14.04/scripts/salt.sh b/ubuntu-14.04/scripts/salt.sh
index b5d5813..4228bb8 100644
--- a/ubuntu-14.04/scripts/salt.sh
+++ b/ubuntu-14.04/scripts/salt.sh
@@ -1,9 +1,19 @@
-wget -O - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
-echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.3 trusty main" >/etc/apt/sources.list.d/saltstack.list
+#!/bin/bash -xe
+
+SALTSTACK_REPO=${SALTSTACK_REPO:-"deb [arch=amd64] https://mirror.mirantis.com/stable/saltstack-2017.7/trusty/ trusty main"}
+SALTSTACK_GPG=${SALTSTACK_GPG:-"https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3/SALTSTACK-GPG-KEY.pub"}
+
+wget -O - ${SALTSTACK_GPG} | sudo apt-key add -
+echo "${SALTSTACK_REPO}" > /etc/apt/sources.list.d/saltstack.list
+
+# We expect issues with GPG,related to our mirrors - so temporary disable check.
+echo "APT::Get::AllowUnauthenticated true;" > /etc/apt/apt.conf.d/99allow_unauthenticated
+
 apt-get update
 apt-get -y install salt-minion
 mkdir -m700 -p /etc/salt/pki/minion
-echo "
+
+cat <<EOF >> /etc/salt/minion.d/minion.conf
 max_event_size: 100000000
 acceptance_wait_time_max: 60
 acceptance_wait_time: 10
@@ -11,4 +21,8 @@
 recon_default: 1000
 recon_max: 60000
 recon_randomize: True
-auth_timeout: 60" >> /etc/salt/minion
+auth_timeout: 60
+EOF
+
+rm -vf /etc/apt/apt.conf.d/99allow_unauthenticated
+rm -vf /etc/apt/sources.list.d/saltstack.list