Skip to content
Snippets Groups Projects
Commit 58544662 authored by Martin Cuchran's avatar Martin Cuchran
Browse files

Added ps1 to template

parent b6adbea8
No related branches found
No related tags found
No related merge requests found
{
"resource_registry":{
"Lib::private_network": "https://gitlab.ics.muni.cz/396462/PV176/raw/master/Openstack/pv176-network.template",
"Lib::server_vm": "https://gitlab.ics.muni.cz/396462/PV176/raw/master/Openstack/pv176-server.template"
"Lib::server_vm": "https://gitlab.ics.muni.cz/396462/PV176/raw/master/Openstack/pv176-server.template",
"Lib::server_init_script": "https://gitlab.ics.muni.cz/396462/PV176/raw/master/Openstack/server-init.ps1"
}
}
\ No newline at end of file
......@@ -49,8 +49,8 @@
"port": "PV176-port-%index%"
}
],
"user_data": "#ps1_sysnative;$ErrorActionPreference = 'Stop';$ip = (int)%index%+2;$adapter = Get-NetAdapter;$adapter | New-NetIPAddress -AddressFamily 'IPv4' -IPAddress '10.0.0.'+$ip -PrefixLength '8' -DefaultGateway '10.0.0.1';$adapter | Set-DnsClientServerAddress -ServerAddresses '147.251.4.33';$user = [ADSI]'WinNT://./Administrator';$user.SetPassword('Password.1');NET USER pv176 Password.1 /add;NET LOCALGROUP Administrators pv176 /add;exit 1001"
}
"user_data": {"get_file": "Lib::server_init_script"}
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment