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
# Create a resource group if it doesn't exist | |
resource "azurerm_resource_group" "myterraformgroup" { | |
name = "myResourceGroup" | |
location = "eastus" | |
tags = { | |
environment = "Terraform Demo" | |
} | |
} |
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
set -ex # fail on first exception | |
#az login | |
#az account show | |
subs="My-Subs-Name" | |
az account set --subscription "$subs" | |
rg=$1 | |
# Or use a fixed value of rg | |
rg=my-rg-name |
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
A collection of my favorites DNS |
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
<# | |
.SYNOPSIS | |
Installs the configuration manager client. | |
.DESCRIPTION | |
Installs the configuration manager client using the script location as source. | |
.EXAMPLE | |
Powershell.exe -File Install-CMClient.ps1 -ExecutionPolicy 'Bypass' -WindowStyle 'Hidden' | |
.INPUTS | |
None. | |
.OUTPUTS |
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
resource "azurerm_virtual_machine_extension" "domjoin" { | |
name = "domjoin" | |
location = "${var.location}" | |
resource_group_name = "${var.image_resource_group}" | |
virtual_machine_name = "${var.prefix}" | |
publisher = "Microsoft.Compute" | |
type = "JsonADDomainExtension" | |
type_handler_version = "1.3" | |
# What the settings mean: https://docs.microsoft.com/en-us/windows/desktop/api/lmjoin/nf-lmjoin-netjoindomain | |
settings = <<SETTINGS |
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
yum update | |
yum -y install ntpd git htop telnet tmux nc | |
chkconfig ntpd on | |
chkconfig | grep ntpd | |
// puppet repo - install it on master and clients/agents | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |