Created
May 2, 2019 23:06
-
-
Save ITJamie/bb0096590095dc7402a51609ae678ebd to your computer and use it in GitHub Desktop.
How to kill netplan in ubuntu 17.10+ 18.04 +++ in kitchen vagrant.rb and revert to ifupdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure(2) do |config| | |
config.vm.provision 'shell', inline: <<-SHELL | |
sudo apt -y install ifupdown | |
sudo apt -y purge netplan.io | |
sudo rm -vfr /usr/share/netplan /etc/netplan | |
echo -e "auto eth0\niface eth0 inet dhcp\npre-up sleep 2" >> /etc/network/interfaces.d/eth0 | |
echo -e "auto lo\niface lo inet loopback \n\nsource /etc/network/interfaces.d/*" >> /etc/network/interfaces | |
sudo service networking restart | |
echo "IM GOING TO REBOOT NOW TO KILL NETPLAN FROM MEMORY" | |
sudo reboot now | |
SHELL | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment