mache.deploy.machine.get_machine
- mache.deploy.machine.get_machine(*, requested_machine: str | None, machines_path: str | None = None, quiet: bool = False) str | None[source]
Get the selected machine.
If
requested_machineis provided, it must correspond to a machine known to mache and/or the target software. If it is unknown, aValueErroris raised.If
requested_machineis not provided, we attempt to detect the machine usingmache.discover.discover_machine(). If detection fails or yields an unknown machine, the returned machine isNone.- Parameters:
requested_machine – The requested machine name (known to mache and/or the target software) or
Noneto detect the machine.machines_path – Optional path (absolute or relative to repo root) containing machine config files in ini format (e.g.
deploy/machines). IfNone/empty, onlymache.machinesis used.quiet – If True, suppress warnings.
- Returns:
machine – The selected machine name (known to mache and/or the target software) or
None.