Provide username and hostname in orchestrator
This commit is contained in:
parent
5f86e90dd7
commit
877e4db663
1 changed files with 6 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import getpass
|
||||||
|
import socket
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
|
|
||||||
from rich import print
|
from rich import print
|
||||||
|
|
@ -22,9 +24,13 @@ class Orchestrator:
|
||||||
def __init__(self, name: str = "pasch", dry_run: bool = False) -> None:
|
def __init__(self, name: str = "pasch", dry_run: bool = False) -> None:
|
||||||
self.name = name
|
self.name = name
|
||||||
self.dry_run = dry_run
|
self.dry_run = dry_run
|
||||||
|
|
||||||
self.state_dir = xdg_state_home() / self.name
|
self.state_dir = xdg_state_home() / self.name
|
||||||
self.console = Console(highlight=False)
|
self.console = Console(highlight=False)
|
||||||
|
|
||||||
|
self.user = getpass.getuser()
|
||||||
|
self.host = socket.gethostname()
|
||||||
|
|
||||||
self._frozen: bool = False
|
self._frozen: bool = False
|
||||||
self._modules: list[Module] = []
|
self._modules: list[Module] = []
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue