Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do not require identity data when reset_partition_only #1740

Merged
merged 1 commit into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions examples/autoinstall/reset-only.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
version: 1
identity:
realname: ''
username: ubuntu
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
hostname: ubuntu
storage:
layout:
name: direct
Expand Down
10 changes: 7 additions & 3 deletions subiquity/server/controllers/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@ def load_autoinstall_data(self, data):

@with_context()
async def apply_autoinstall_config(self, context=None):
if not self.model.user:
if 'user-data' not in self.app.autoinstall_config:
raise Exception("no identity data provided")
if self.model.user:
return
if 'user-data' in self.app.autoinstall_config:
return
if self.app.base_model.target is None:
return
raise Exception("no identity data provided")

def make_autoinstall(self):
if self.model.user is None:
Expand Down
Loading