from ...SetupSteps.General.PerformOrderedServerReboots import PerformOrderedServerReboots
from ...SetupSteps.Playbooks.Playbook import Playbook


class RebootServers(Playbook):
    def start(self):
        if self.credentials.no_reboot:
            return
        self.ui.confirm('A reboot of server and opsi server is required. Confirm to reboot now.')
        self.run_steps(
            PerformOrderedServerReboots()
        )