mache.discover.discover_machine

mache.discover.discover_machine(quiet: bool = False, package: str | None = None, path: str | None = None)[source]

Figure out the machine from the host name.

Parameters:
  • quiet (bool, optional) – Whether to print warnings if the machine name is ambiguous

  • package (str, optional) – An additional Python package to search for machine config files (*.cfg) that include a [discovery] hostname_re entry.

  • path (str, optional) – An additional directory to search for machine config files (*.cfg) that include a [discovery] hostname_re entry.

Returns:

machine (str) – The name of the current machine