UNCLASSIFIED

Skip to content
Snippets Groups Projects
Commit ee0d5664 authored by John Rollinson's avatar John Rollinson
Browse files

Update parameter substitution

parent abf52381
Branches
No related merge requests found
......@@ -4,6 +4,12 @@ description: Heat Template for an auto-start Windows domain. Domain consists of
parameters:
domain:
type: string
label: Domain
description: Identifier for the domain
default: local
subnet:
type: string
label: Subnet Prefix
......@@ -22,9 +28,9 @@ resources:
properties:
name:
str_replace:
template: lastName_network_0
template: DOMAIN_network_0
params:
lastName: { get_param: last_name }
DOMAIN: { get_param: domain }
admin_state_up: true
shared: false
......@@ -34,33 +40,33 @@ resources:
allocation_pools:
- start:
str_replace:
template: 10.studentID.0.200
template: SUBNET.200
params:
studentID: { get_param: student_id }
SUBNET: { get_param: subnet }
end:
str_replace:
template: 10.studentID.0.250
template: SUBNET.250
params:
studentID: { get_param: student_id }
SUBNET: { get_param: subnet }
cidr:
str_replace:
template: 10.studentID.0.0/24
template: SUBNET.0/24
params:
studentID: { get_param: student_id }
SUBNET: { get_param: subnet }
gateway_ip:
str_replace:
template: 10.studentID.0.254
template: SUBNET.254
params:
studentID: { get_param: student_id }
SUBNET: { get_param: subnet }
dns_nameservers: [10.50.255.254]
enable_dhcp: true
host_routes: []
ip_version: 4
name:
str_replace:
template: lastname_subnet_0
template: DOMAIN_subnet_0
params:
lastname: { get_param: last_name }
DOMAIN: { get_param: domain }
network_id:
get_resource: network_0
......@@ -69,9 +75,9 @@ resources:
properties:
name:
str_replace:
template: lastname_router
template: DOMAIN_router
params:
lastname: { get_param: last_name }
DOMAIN: { get_param: domain }
external_gateway_info:
network: public
......@@ -88,9 +94,9 @@ resources:
fixed_ips:
- ip_address:
str_replace:
template: 10.studentID.0.1
template: SUBNET.1
params:
studentID: { get_param: student_id }
SUBNET: { get_param: subnet }
port_security_enabled: false
server_1:
......@@ -101,9 +107,9 @@ resources:
image: Windows Server 2016
name:
str_replace:
template: lastname-Domain-Controller
template: DOMAIN_dc01
params:
lastname: { get_param: last_name }
DOMAIN: { get_param: domain }
networks:
- port: { get_resource: server_1_subnet_0_port }
user_data:
......@@ -120,10 +126,10 @@ resources:
New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\winlogon" -Name "AutoAdminLogon" -PropertyType DWord -Value 1
New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\winlogon" -Name "DefaultUserName" -PropertyType String -Value "Administrator"
New-ItemProperty -Path "HKLM:\Software\Microsoft\Windows NT\CurrentVersion\winlogon" -Name "DefaultPassword" -PropertyType String -Value 'password123!@'
Invoke-WebRequest -Uri "http://10.50.20.28/scripts/setup1.ps1" -OutFile "C:\setup1.ps1"
Invoke-WebRequest -Uri "http://10.50.20.28/scripts/setup2.ps1" -OutFile "C:\setup2.ps1"
Invoke-WebRequest -Uri "https://bitskrieg.net/mouse.zip" -OutFile "C:\mouse.zip"
Set-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce" "setup1" 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -sta -File "C:\setup1.ps1"'
#Invoke-WebRequest -Uri "http://10.50.20.28/scripts/setup1.ps1" -OutFile "C:\setup1.ps1"
#Invoke-WebRequest -Uri "http://10.50.20.28/scripts/setup2.ps1" -OutFile "C:\setup2.ps1"
#Invoke-WebRequest -Uri "https://bitskrieg.net/mouse.zip" -OutFile "C:\mouse.zip"
#Set-ItemProperty "HKLM:\Software\Microsoft\Windows\CurrentVersion\RunOnce" "setup1" 'C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -sta -File "C:\setup1.ps1"'
exit 1001
params:
$user: { get_param: last_name }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment