from ...Logging.Logger import log, Severity
from ..SetupStep import SetupStep
from ...SetupSteps.Playbooks.Playbook import FileCleanupTask, PlaybookCredentialCollection


class SetSystemAccountPassword(SetupStep):
    def run(self, file_cleanup_stack : list[FileCleanupTask], credentials: PlaybookCredentialCollection) -> bool:
        try:
            # Assuming the method to set system account password is implemented here
            log("System account password set successfully.")
            return True
        except Exception as e:
            log(f"Failed to set system account password: {e}", Severity.ERROR)
            return False