Skip to content

Commit

Permalink
Merge branch 'dev' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dweinholz committed Nov 30, 2023
2 parents fdd7bd0 + 0d193e0 commit 9a0ff50
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions simple_vm_client/openstack_connector/openstack_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,17 +1163,24 @@ def create_userdata(
new_volumes=volume_ids_path_new,
attach_volumes=volume_ids_path_attach,
)

if additional_keys:
if init_script:
add_key_script = self.create_add_keys_script(keys=additional_keys)
init_script = (
add_key_script
+ encodeutils.safe_encode("\n".encode("utf-8"))

+ init_script
)

else:
init_script = self.create_add_keys_script(keys=additional_keys)
unlock_ubuntu_user_script = "\npasswd -u ubuntu\n"
unlock_ubuntu_user_script = encodeutils.safe_encode(
unlock_ubuntu_user_script.encode("utf-8")
)
init_script = init_script + unlock_ubuntu_user_script
return init_script

def start_server(
Expand Down

0 comments on commit 9a0ff50

Please sign in to comment.