blob: fbb618a4024e971910f73f55ea71cda5fc535b90 [file] [log] [blame]
Richard Felkl4c4829d2017-11-11 00:12:20 +01001#!/bin/bash -xe
2
3export SALT_MASTER_DEPLOY_IP=10.1.0.14
4export APTLY_DEPLOY_IP=10.1.0.14
5export APTLY_DEPLOY_NETMASK=255.255.0.0
6export APTLY_MINION_ID=apt01.deploy-name.local
7
8echo "Configuring network interfaces"
9envsubst < /root/interfaces > /etc/network/interfaces
Dmitry Stremkouskia94b5f32017-12-02 00:41:54 +030010ip a flush dev ens3
Dmitry Stremkouskib43c4ee2017-12-02 02:21:05 +030011rm -f /var/run/network/ifstate.ens3
12if [[ $(grep -E '^\ *gateway\ ' /etc/network/interfaces) ]]; then
13(ip r s | grep ^default) && ip r d default || /bin/true
14fi;
Dmitry Stremkouskia94b5f32017-12-02 00:41:54 +030015ifup ens3
Richard Felkl4c4829d2017-11-11 00:12:20 +010016
17echo "Configuring salt"
18service salt-minion stop
19systemctl disable salt-minion.service
20envsubst < /root/minion.conf > /etc/salt/minion.d/minion.conf
21#service salt-minion restart