File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,10 +44,21 @@ build {
4444 " SSH_PORT=${ build . Port } " ]
4545 }
4646
47+ # disable cloud-init
4748 provisioner "shell" {
4849 inline = [
4950 " echo 'GRUB_CMDLINE_LINUX=\" cloud-init=disabled\" ' | tee -a /etc/default/grub" ,
50- " update-grub"
51+ " update-grub" ,
52+ " touch /etc/cloud/cloud-init.disabled"
53+ ]
54+ }
55+
56+ # enable DHCP
57+ provisioner "shell" {
58+ inline = [
59+ " apt-get update" ,
60+ " apt-get install -y ifupdown" ,
61+ " rm -f /etc/netplan/50-cloud-init.yaml"
5162 ]
5263 }
5364
Original file line number Diff line number Diff line change @@ -44,10 +44,21 @@ build {
4444 " SSH_PORT=${ build . Port } " ]
4545 }
4646
47+ # disable cloud-init
4748 provisioner "shell" {
4849 inline = [
4950 " echo 'GRUB_CMDLINE_LINUX=\" cloud-init=disabled\" ' | tee -a /etc/default/grub" ,
50- " update-grub"
51+ " update-grub" ,
52+ " touch /etc/cloud/cloud-init.disabled"
53+ ]
54+ }
55+
56+ # enable DHCP
57+ provisioner "shell" {
58+ inline = [
59+ " apt-get update" ,
60+ " apt-get install -y ifupdown" ,
61+ " rm -f /etc/netplan/50-cloud-init.yaml"
5162 ]
5263 }
5364
You can’t perform that action at this time.
0 commit comments