mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 20:08:09 +00:00
only set VM passwords on Windows (#620)
This commit is contained in:
@ -77,7 +77,6 @@ def create_vm(
|
||||
"os_profile": {
|
||||
"computer_name": "node",
|
||||
"admin_username": "onefuzz",
|
||||
"admin_password": password,
|
||||
},
|
||||
"hardware_profile": {"vm_size": vm_sku},
|
||||
"storage_profile": {"image_reference": image_ref},
|
||||
@ -88,7 +87,11 @@ def create_vm(
|
||||
if isinstance(image_os, Error):
|
||||
return image_os
|
||||
|
||||
if image_os == OS.windows:
|
||||
params["os_profile"]["admin_password"] = password
|
||||
|
||||
if image_os == OS.linux:
|
||||
|
||||
params["os_profile"]["linux_configuration"] = {
|
||||
"disable_password_authentication": True,
|
||||
"ssh": {
|
||||
|
@ -263,7 +263,6 @@ def create_vmss(
|
||||
"os_profile": {
|
||||
"computer_name_prefix": "node",
|
||||
"admin_username": "onefuzz",
|
||||
"admin_password": password,
|
||||
},
|
||||
"network_profile": {
|
||||
"network_interface_configurations": [
|
||||
@ -285,6 +284,9 @@ def create_vmss(
|
||||
if isinstance(image_os, Error):
|
||||
return image_os
|
||||
|
||||
if image_os == OS.windows:
|
||||
params["virtual_machine_profile"]["os_profile"]["admin_password"] = password
|
||||
|
||||
if image_os == OS.linux:
|
||||
params["virtual_machine_profile"]["os_profile"]["linux_configuration"] = {
|
||||
"disable_password_authentication": True,
|
||||
|
Reference in New Issue
Block a user