Merge pull request #1740 from mwhudson/no-identity-reset-only

do not require identity data when reset_partition_only
This commit is contained in:
Michael Hudson-Doyle 2023-07-25 10:36:03 +12:00 committed by GitHub
commit 307f3b5c0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -1,9 +1,4 @@
version: 1
identity:
realname: ''
username: ubuntu
password: '$6$wdAcoXrU039hKYPd$508Qvbe7ObUnxoj15DRCkzC3qO7edjH0VV7BPNRDYK4QR8ofJaEEF2heacn0QgD.f8pO8SNp83XNdWG6tocBM1'
hostname: ubuntu
storage:
layout:
name: direct

View File

@ -85,9 +85,13 @@ class IdentityController(SubiquityController):
@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: