Skip to content

Instantly share code, notes, and snippets.

@rooftop90
Last active August 25, 2020 11:59
Show Gist options
  • Save rooftop90/4da48f8e5c35f6c94e43342e14815afd to your computer and use it in GitHub Desktop.
Save rooftop90/4da48f8e5c35f6c94e43342e14815afd to your computer and use it in GitHub Desktop.
{
"type": "Microsoft.VirtualMachineImages",
"apiVersion": "2019-05-01-preview",
"location": "<location>",
"dependsOn": [],
"tags": {
"imagebuilderTemplate": "AzureImageBuilderSIG",
"userIdentity": "enabled"
},
"identity": {
"type": "UserAssigned",
"userAssignedIdentities": {
"<imgBuilderUri>": {}
}
},
"properties": {
"buildTimeoutInMinutes": 80,
"vmProfile": {
"vmSize": "Standard_D1_v2",
"osDiskSizeGB": 30
},
"source": {
"type": "PlatformImage",
"publisher": "OpenLogic",
"offer": "CentOS",
"sku": "7_8",
"version": "7.8.2020051900"
},
"customize": [
{
"type": "Shell",
"name": "NetworkSetup",
"scriptUri": "https://gist.githubusercontent.com/rooftop90/57a86130bfdfe7747e18d9daf4bddc7d/raw/bd95b2538dc2eadb482974720be6d136809a3f7f/basis-network-security.sh"
},
{
"type": "Shell",
"name": "EnforcePWPolicy",
"inline": [
"authconfig --enablereqlower --enablerequpper --enablereqdigit --enablereqother --passminlen=9 --passmaxrepeat=3 --update"
]
},
{
"type": "Shell",
"name": "DockerSetup",
"scriptUri": "https://gist.githubusercontent.com/rooftop90/56f0ee1646b8dc151f639c9f47185b5f/raw/08c4c9681d2da063280254a1d5ee7266bcd24ba9/setup-docker.sh"
}
],
"distribute": [
{
"type": "SharedImage",
"galleryImageId": "/subscriptions/<subscriptionId>/resourceGroups/<rg>/providers/Microsoft.Compute/galleries/<sigName>/images/<imgDefName>",
"runOutputName": "<outputName>",
"artifactTags": {
"source": "azVmImageBuilder",
"baseosimg": "centos78"
},
"replicationRegions": [
"<location>"
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment