Pfad der auflösung für Tests und autodoc geändert, weil Mitogen sonst blockiert
Dieser Commit ist enthalten in:
Ursprung
5a7fcb40bb
Commit
ebca030585
|
@ -21,3 +21,7 @@ releases:
|
||||||
release_summary: kleines feature update
|
release_summary: kleines feature update
|
||||||
minor_changes:
|
minor_changes:
|
||||||
- update_doc hinzugefügt. um Dokumentation automatisch zu aktualisieren
|
- update_doc hinzugefügt. um Dokumentation automatisch zu aktualisieren
|
||||||
|
0.1.2:
|
||||||
|
changes:
|
||||||
|
release_date: '2023-04-15'
|
||||||
|
release_summary: Pfad der auflösung für Tests und autodoc geändert, weil Mitogen sonst blockiert
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
namespace: sebastian
|
namespace: sebastian
|
||||||
name: systemd
|
name: systemd
|
||||||
version: 0.1.1
|
version: 0.1.2
|
||||||
|
|
||||||
readme: README.md
|
readme: README.md
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import ansible.module_utils.basic as basic
|
||||||
try:
|
try:
|
||||||
from ansible.module_utils.generic import _sdict
|
from ansible.module_utils.generic import _sdict
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from module_utils.generic import _sdict
|
from generic import _sdict
|
||||||
|
|
||||||
__all__ = (
|
__all__ = (
|
||||||
"AnsibleModule",
|
"AnsibleModule",
|
||||||
|
|
|
@ -7,9 +7,9 @@ try:
|
||||||
from ansible.module_utils.generic import Types
|
from ansible.module_utils.generic import Types
|
||||||
from ansible.module_utils.module import SystemdUnitModule
|
from ansible.module_utils.module import SystemdUnitModule
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from module_utils.generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
from generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
||||||
from module_utils.generic import Types
|
from generic import Types
|
||||||
from module_utils.module import SystemdUnitModule
|
from module import SystemdUnitModule
|
||||||
|
|
||||||
|
|
||||||
class Module(SystemdUnitModule):
|
class Module(SystemdUnitModule):
|
||||||
|
|
|
@ -7,9 +7,9 @@ try:
|
||||||
from ansible.module_utils.generic import Types
|
from ansible.module_utils.generic import Types
|
||||||
from ansible.module_utils.module import SystemdUnitModule
|
from ansible.module_utils.module import SystemdUnitModule
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from module_utils.generic import SYSTEMD_SERVICE_CONFIG as SYSTEMD_PATH
|
from generic import SYSTEMD_SERVICE_CONFIG as SYSTEMD_PATH
|
||||||
from module_utils.generic import Types
|
from generic import Types
|
||||||
from module_utils.module import SystemdUnitModule
|
from module import SystemdUnitModule
|
||||||
|
|
||||||
SYSTEMD_PATH = pathlib.Path("/etc/systemd/system")
|
SYSTEMD_PATH = pathlib.Path("/etc/systemd/system")
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ try:
|
||||||
from ansible.module_utils.generic import Types
|
from ansible.module_utils.generic import Types
|
||||||
from ansible.module_utils.module import SystemdUnitModule
|
from ansible.module_utils.module import SystemdUnitModule
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from module_utils.generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
from generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
||||||
from module_utils.generic import Types
|
from generic import Types
|
||||||
from module_utils.module import SystemdUnitModule
|
from module import SystemdUnitModule
|
||||||
|
|
||||||
def boolconvert(b: Union[bool, str]) -> str:
|
def boolconvert(b: Union[bool, str]) -> str:
|
||||||
if b is True:
|
if b is True:
|
||||||
|
|
|
@ -4,7 +4,8 @@ import pathlib
|
||||||
import importlib
|
import importlib
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.append("plugins")
|
sys.path.append("plugins/module_utils")
|
||||||
|
sys.path.append("plugins/modules")
|
||||||
mindocstring = "DOCUMENTATION = ''''''"
|
mindocstring = "DOCUMENTATION = ''''''"
|
||||||
|
|
||||||
moduledir = pathlib.Path("plugins/modules")
|
moduledir = pathlib.Path("plugins/modules")
|
||||||
|
@ -14,7 +15,7 @@ if __name__ == "__main__":
|
||||||
for modfile in moduledir.iterdir():
|
for modfile in moduledir.iterdir():
|
||||||
if modfile.name in ( "__init__.py", "__pycache__"):
|
if modfile.name in ( "__init__.py", "__pycache__"):
|
||||||
continue
|
continue
|
||||||
mod = importlib.import_module("modules."+modfile.stem)
|
mod = importlib.import_module(modfile.stem)
|
||||||
if hasattr(mod, "Module"):
|
if hasattr(mod, "Module"):
|
||||||
module = mod.Module
|
module = mod.Module
|
||||||
elif hasattr(mod, "__module_name__"):
|
elif hasattr(mod, "__module_name__"):
|
||||||
|
|
Laden…
In neuem Issue referenzieren