import test
Dieser Commit ist enthalten in:
Ursprung
ebca030585
Commit
e2fdd94da4
|
@ -7,10 +7,11 @@ try:
|
|||
from ansible.module_utils.generic import Types
|
||||
from ansible.module_utils.module import SystemdUnitModule
|
||||
except ImportError:
|
||||
from generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
||||
from generic import Types
|
||||
from module import SystemdUnitModule
|
||||
|
||||
import sys
|
||||
print(sys.path)
|
||||
from module_utils.generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
||||
from module_utils.generic import Types
|
||||
from module_utils.module import SystemdUnitModule
|
||||
|
||||
class Module(SystemdUnitModule):
|
||||
"""generates an systemd-networkd link"""
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
#!/usr/bin/python3
|
||||
import pathlib
|
||||
from typing import List, Optional
|
||||
|
||||
try:
|
||||
from ansible.module_utils.generic import SYSTEMD_SERVICE_CONFIG as SYSTEMD_PATH
|
||||
from ansible.module_utils.generic import Types
|
||||
from ansible.module_utils.module import SystemdUnitModule
|
||||
except ImportError:
|
||||
from generic import SYSTEMD_SERVICE_CONFIG as SYSTEMD_PATH
|
||||
from generic import Types
|
||||
from module import SystemdUnitModule
|
||||
import sys
|
||||
print(sys.path)
|
||||
|
||||
SYSTEMD_PATH = pathlib.Path("/etc/systemd/system")
|
||||
|
||||
|
|
|
@ -7,9 +7,8 @@ try:
|
|||
from ansible.module_utils.generic import Types
|
||||
from ansible.module_utils.module import SystemdUnitModule
|
||||
except ImportError:
|
||||
from generic import SYSTEMD_NETWORK_CONFIG as SYSTEMD_PATH
|
||||
from generic import Types
|
||||
from module import SystemdUnitModule
|
||||
import sys
|
||||
print(sys.path)
|
||||
|
||||
def boolconvert(b: Union[bool, str]) -> str:
|
||||
if b is True:
|
||||
|
|
|
@ -3,10 +3,11 @@ import re
|
|||
import pathlib
|
||||
import importlib
|
||||
import sys
|
||||
import ansible.module_utils
|
||||
|
||||
sys.path.append("plugins/module_utils")
|
||||
sys.path.append("plugins/modules")
|
||||
mindocstring = "DOCUMENTATION = ''''''"
|
||||
sys.path.append("plugins/modules")
|
||||
sys.path.append(".")
|
||||
|
||||
moduledir = pathlib.Path("plugins/modules")
|
||||
regex = re.compile("DOCUMENTATION *= *r?(?P<quote>\"{3}|'{3})(---)?.*?(?P=quote)", re.MULTILINE | re.DOTALL)
|
||||
|
@ -15,7 +16,7 @@ if __name__ == "__main__":
|
|||
for modfile in moduledir.iterdir():
|
||||
if modfile.name in ( "__init__.py", "__pycache__"):
|
||||
continue
|
||||
mod = importlib.import_module(modfile.stem)
|
||||
mod = importlib.import_module("plugins.modules."+modfile.stem)
|
||||
if hasattr(mod, "Module"):
|
||||
module = mod.Module
|
||||
elif hasattr(mod, "__module_name__"):
|
||||
|
|
Laden…
In neuem Issue referenzieren