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
# Powershell refuses to connect to the Netbox API on our setup without this. | |
add-type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, | |
WebRequest request, int certificateProblem) { | |
return true; | |
} |
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 |
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
require 'rest-client' #rubygem | |
require 'date' | |
require 'openssl' | |
#warning. the code from below has come from a class. Ive cleaned it up but there may be some errors. This is a GIST after all | |
# Instance variables | |
@LM_accountname = 'lM_accountname' |