Richard Felkl | 4c4829d | 2017-11-11 00:12:20 +0100 | [diff] [blame] | 1 | #!/bin/bash -xe |
| 2 | |
| 3 | export SALT_MASTER_DEPLOY_IP=10.1.0.14 |
| 4 | export APTLY_DEPLOY_IP=10.1.0.14 |
| 5 | export APTLY_DEPLOY_NETMASK=255.255.0.0 |
| 6 | export APTLY_MINION_ID=apt01.deploy-name.local |
| 7 | |
| 8 | echo "Configuring network interfaces" |
| 9 | envsubst < /root/interfaces > /etc/network/interfaces |
Dmitry Stremkouski | a94b5f3 | 2017-12-02 00:41:54 +0300 | [diff] [blame] | 10 | ip a flush dev ens3 |
Dmitry Stremkouski | b43c4ee | 2017-12-02 02:21:05 +0300 | [diff] [blame^] | 11 | rm -f /var/run/network/ifstate.ens3 |
| 12 | if [[ $(grep -E '^\ *gateway\ ' /etc/network/interfaces) ]]; then |
| 13 | (ip r s | grep ^default) && ip r d default || /bin/true |
| 14 | fi; |
Dmitry Stremkouski | a94b5f3 | 2017-12-02 00:41:54 +0300 | [diff] [blame] | 15 | ifup ens3 |
Richard Felkl | 4c4829d | 2017-11-11 00:12:20 +0100 | [diff] [blame] | 16 | |
| 17 | echo "Configuring salt" |
| 18 | service salt-minion stop |
| 19 | systemctl disable salt-minion.service |
| 20 | envsubst < /root/minion.conf > /etc/salt/minion.d/minion.conf |
| 21 | #service salt-minion restart |