Skip to content

Commit

Permalink
do not require identity data when reset_partition_only
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhudson committed Jul 24, 2023
1 parent e84b3dd commit d824742
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
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

0 comments on commit d824742

Please sign in to comment.