Skip to content

Instantly share code, notes, and snippets.

@ITJamie
Created May 2, 2019 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ITJamie/bb0096590095dc7402a51609ae678ebd to your computer and use it in GitHub Desktop.
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
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