summaryrefslogtreecommitdiff
path: root/scripts/vyos/cloud-init-debian.sh
blob: 0f12066bf9cff4c00303d61bd66c766abecc3f99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

set -e
set -x

if [[ "${CLOUD_INIT}" != "debian" ]]; then
    echo "$0 - info: cloud_init not debian, skipping"
    exit 0
fi

export DEBIAN_FRONTEND=noninteractive

apt purge -y \
    cloud-init \
    cloud-utils \
    ifupdown

apt install -y \
    cloud-init \
    cloud-utils \
    ifupdown

systemctl enable cloud-init

cat <<EOF > /etc/cloud/cloud.cfg.d/99-disable_network_config.cfg
network: {config: disabled}
EOF

rm -rf /etc/network/interfaces.d/50-cloud-init || :