From ebca0305850486bbed96700869bb2cc1e31945c4 Mon Sep 17 00:00:00 2001 From: Sebastian Tobie Date: Sat, 15 Apr 2023 15:02:14 +0200 Subject: [PATCH] =?UTF-8?q?Pfad=20der=20aufl=C3=B6sung=20f=C3=BCr=20Tests?= =?UTF-8?q?=20und=20autodoc=20ge=C3=A4ndert,=20weil=20Mitogen=20sonst=20bl?= =?UTF-8?q?ockiert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelogs/changelog.yaml | 4 ++++ galaxy.yml | 2 +- plugins/module_utils/module.py | 2 +- plugins/modules/systemd_link.py | 6 +++--- plugins/modules/systemd_mount.py | 6 +++--- plugins/modules/systemd_network.py | 6 +++--- update_doc | 5 +++-- 7 files changed, 18 insertions(+), 13 deletions(-) diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 0cc8e91..c2d125c 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -21,3 +21,7 @@ releases: release_summary: kleines feature update minor_changes: - 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 diff --git a/galaxy.yml b/galaxy.yml index 50476de..ac4026a 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: sebastian name: systemd -version: 0.1.1 +version: 0.1.2 readme: README.md diff --git a/plugins/module_utils/module.py b/plugins/module_utils/module.py index ea3bdf1..dd2e25e 100644 --- a/plugins/module_utils/module.py +++ b/plugins/module_utils/module.py @@ -5,7 +5,7 @@ import ansible.module_utils.basic as basic try: from ansible.module_utils.generic import _sdict except ImportError: - from module_utils.generic import _sdict + from generic import _sdict __all__ = ( "AnsibleModule", diff --git a/plugins/modules/systemd_link.py b/plugins/modules/systemd_link.py index a43460f..4d98970 100644 --- a/plugins/modules/systemd_link.py +++ b/plugins/modules/systemd_link.py @@ -7,9 +7,9 @@ try: from ansible.module_utils.generic import Types from ansible.module_utils.module import SystemdUnitModule except ImportError: - from module_utils.generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH - from module_utils.generic import Types - from module_utils.module import SystemdUnitModule + from generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH + from generic import Types + from module import SystemdUnitModule class Module(SystemdUnitModule): diff --git a/plugins/modules/systemd_mount.py b/plugins/modules/systemd_mount.py index cb056ab..2ac811e 100644 --- a/plugins/modules/systemd_mount.py +++ b/plugins/modules/systemd_mount.py @@ -7,9 +7,9 @@ try: from ansible.module_utils.generic import Types from ansible.module_utils.module import SystemdUnitModule except ImportError: - from module_utils.generic import SYSTEMD_SERVICE_CONFIG as SYSTEMD_PATH - from module_utils.generic import Types - from module_utils.module import SystemdUnitModule + from generic import SYSTEMD_SERVICE_CONFIG as SYSTEMD_PATH + from generic import Types + from module import SystemdUnitModule SYSTEMD_PATH = pathlib.Path("/etc/systemd/system") diff --git a/plugins/modules/systemd_network.py b/plugins/modules/systemd_network.py index b4a9987..2443f6a 100644 --- a/plugins/modules/systemd_network.py +++ b/plugins/modules/systemd_network.py @@ -7,9 +7,9 @@ try: from ansible.module_utils.generic import Types from ansible.module_utils.module import SystemdUnitModule except ImportError: - from module_utils.generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH - from module_utils.generic import Types - from module_utils.module import SystemdUnitModule + from generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH + from generic import Types + from module import SystemdUnitModule def boolconvert(b: Union[bool, str]) -> str: if b is True: diff --git a/update_doc b/update_doc index f21d90a..7890907 100755 --- a/update_doc +++ b/update_doc @@ -4,7 +4,8 @@ import pathlib import importlib import sys -sys.path.append("plugins") +sys.path.append("plugins/module_utils") +sys.path.append("plugins/modules") mindocstring = "DOCUMENTATION = ''''''" moduledir = pathlib.Path("plugins/modules") @@ -14,7 +15,7 @@ if __name__ == "__main__": for modfile in moduledir.iterdir(): if modfile.name in ( "__init__.py", "__pycache__"): continue - mod = importlib.import_module("modules."+modfile.stem) + mod = importlib.import_module(modfile.stem) if hasattr(mod, "Module"): module = mod.Module elif hasattr(mod, "__module_name__"):