recipes/machine_setup.py

25 lines
653 B
Python
Raw Normal View History

import argparse
import logging
from machine_admin.user import User
from machine_admin.machine import Machine
if __name__ == "__main__":
parser = argparse.ArgumentParser(
prog='MachineSetup',
description='Scripts for machine provisioning')
parser.add_argument('--username',
help="Name of the default non-root user")
2024-03-29 12:18:29 +00:00
parser.add_argument('--dry_run',
help="If set then don't change the system state - used for testing.",
default = False)
args = parser.parse_args()
user = User(args.username, has_sudo=True)
machine = Machine(user)
machine.setup()