Skip to content

Instantly share code, notes, and snippets.

@divgo
Created January 25, 2018 17:11
Show Gist options
  • Save divgo/408c32b03a0669254a58e150597db7dd to your computer and use it in GitHub Desktop.
Save divgo/408c32b03a0669254a58e150597db7dd to your computer and use it in GitHub Desktop.
#!/bin/bash
cd /tmp
echo "Onboard Linux VM start" > onboard_vm.txt
echo hello > "script_start.txt"
wget https://github.com/Microsoft/omi/releases/download/v1.4.1-0/omi-1.4.1-0.ssl_100.ulinux.x64.deb
dpkg -i ./omi-1.4.1-0.ssl_100.ulinux.x64.deb
wget https://github.com/Microsoft/PowerShell-DSC-for-Linux/releases/download/v1.1.1-294/dsc-1.1.1-294.ssl_100.x64.deb
dpkg -i ./dsc-1.1.1-294.ssl_100.x64.deb
# Params:
# $1 = Azure Automation Key
# $2 = Azure Automation Endpoint
# $3 = Optional, DSC Config to apply. Leave blank to just onboard VM
/opt/microsoft/dsc/Scripts/Register.py $1 $2 $3
echo "Onboard Linux VM complete" >> onboard_vm.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment