1
0
Fork 0

fixed the import

Dieser Commit ist enthalten in:
Sebastian Tobie 2024-02-11 14:35:00 +01:00
Ursprung 022b5d3ee5
Commit 3198a0d064
12 geänderte Dateien mit 89 neuen und 42 gelöschten Zeilen

Datei anzeigen

@ -1,10 +1,18 @@
===================================== =====================================
sebastian.systemd 0.3.5 Release Notes sebastian.systemd 0.3.6 Release Notes
===================================== =====================================
.. contents:: Topics .. contents:: Topics
v0.3.6
======
Changelog
---------
fixed the import of the module utils
v0.3.5 v0.3.5
====== ======

Datei anzeigen

@ -7,47 +7,50 @@ releases:
- added systemd_mount module - added systemd_mount module
- added systemd_network module - added systemd_network module
release_summary: Erstes Release release_summary: Erstes Release
release_date: '2023-04-15' release_date: "2023-04-15"
0.1.1: 0.1.1:
changes: changes:
minor_changes: minor_changes:
- "update_doc hinzugef\xFCgt. um Dokumentation automatisch zu aktualisieren" - "update_doc hinzugef\xFCgt. um Dokumentation automatisch zu aktualisieren"
release_summary: kleines feature update release_summary: kleines feature update
release_date: '2023-04-15' release_date: "2023-04-15"
0.1.2: 0.1.2:
changes: changes:
release_summary: "Pfad der aufl\xF6sung f\xFCr Tests und autodoc ge\xE4ndert, release_summary: "Pfad der aufl\xF6sung f\xFCr Tests und autodoc ge\xE4ndert, weil Mitogen sonst blockiert"
weil Mitogen sonst blockiert" release_date: "2023-04-15"
release_date: '2023-04-15'
0.1.3: 0.1.3:
changes: changes:
release_summary: renamed all modules to names without systemd_ prefix release_summary: renamed all modules to names without systemd_ prefix
release_date: '2023-04-20' release_date: "2023-04-20"
0.2.0: 0.2.0:
changes: changes:
release_summary: added an rudimentary system_service module release_summary: added an rudimentary system_service module
release_date: '2023-04-21' release_date: "2023-04-21"
0.3.0: 0.3.0:
changes: changes:
release_summary: added socket module and some small fixes release_summary: added socket module and some small fixes
release_date: '2023-04-23' release_date: "2023-04-23"
0.3.1: 0.3.1:
changes: changes:
release_summary: fixed runtime.yml release_summary: fixed runtime.yml
release_date: '2023-04-23' release_date: "2023-04-23"
0.3.2: 0.3.2:
changes: changes:
release_summary: added virtualization and negative matches to link and network release_summary: added virtualization and negative matches to link and network
release_date: '2023-07-15' release_date: "2023-07-15"
0.3.3: 0.3.3:
changes: changes:
release_summary: added netdev module release_summary: added netdev module
release_date: '2023-07-16' release_date: "2023-07-16"
0.3.4: 0.3.4:
changes: changes:
release_summary: moved the module_utils to an indipendent repository release_summary: moved the module_utils to an indipendent repository
release_date: '2023-11-26' release_date: "2023-11-26"
0.3.5: 0.3.5:
changes: changes:
release_summary: added some ignores and changed my name release_summary: added some ignores and changed my name
release_date: '2023-12-30' release_date: "2023-12-30"
0.3.6:
release_date: "2024-02-11"
changes:
release_summary: fixed the import of the module utils

Datei anzeigen

@ -1,25 +1,26 @@
--- ---
namespace: sebastian namespace: sebastian
name: systemd name: systemd
version: 0.3.5 version: 0.3.6
readme: README.md readme: README.md
authors: authors:
- Sebastian Tobie - Sebastian Tobie
description: An simple for generating systemd units with ansible description: An simple for generating systemd units with ansible
license_file: 'LICENSE' license_file: "LICENSE"
tags: tags:
- systemd - systemd
- linux - linux
dependencies: {} dependencies:
sebastian.base: ">=0.2.0"
repository: https://gitea.sebastian-tobie.de/ansible/ansible-systemd.git repository: https://gitea.sebastian-tobie.de/ansible/ansible-systemd.git
# documentation: http://docs.example.com # documentation: http://docs.example.com
homepage: https://gitea.sebastian-tobie.de/ansible/ansible-systemd homepage: https://gitea.sebastian-tobie.de/ansible/ansible-systemd
issues: https://gitea.sebastian-tobie.de/ansible/ansible-systemd/issues issues: https://gitea.sebastian-tobie.de/ansible/ansible-systemd/issues
build_ignore: build_ignore:
- '*.gz' - "*.gz"
- '.*' - ".*"
- Makefile - Makefile
- pyproject.toml - pyproject.toml
- upload.sh - upload.sh

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List from typing import List
from ansible_module.generic import SYSTEMD_NETWORK_CONFIG, Types, modspec try:
from ansible_module.module import SystemdUnitModule from ansible_module.generic import SYSTEMD_NETWORK_CONFIG, Types, modspec
from ansible_module.module import SystemdUnitModule
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_NETWORK_CONFIG, Types, modspec
from ansible.module_utils.sebastian.base.module_utils.module import SystemdUnitModule
class Module(SystemdUnitModule): # type: ignore class Module(SystemdUnitModule): # type: ignore

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Optional from typing import List, Optional
from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, modspec try:
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, modspec
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types, modspec
from ansible.module_utils.sebastian.base.module_utils.module import SystemdReloadMixin, SystemdUnitModule, installable
SYSTEMD_SERVICE_CONFIG = pathlib.Path("/etc/systemd/system") SYSTEMD_SERVICE_CONFIG = pathlib.Path("/etc/systemd/system")

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Optional from typing import List, Optional
from ansible_module.generic import SYSTEMD_NETWORK_CONFIG, Types, joindict, modspec, systemdbool try:
from ansible_module.module import SystemdUnitModule from ansible_module.generic import SYSTEMD_NETWORK_CONFIG, Types, joindict, modspec, systemdbool
from ansible_module.module import SystemdUnitModule
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_NETWORK_CONFIG, Types, joindict, modspec, systemdbool
from ansible.module_utils.sebastian.base.module_utils.module import SystemdUnitModule
kinds = ( kinds = (
"bond", "bond",

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Union from typing import List, Union
from ansible_module.generic import SYSTEMD_NETWORK_CONFIG, Types, modspec, systemdbool try:
from ansible_module.module import SystemdUnitModule from ansible_module.generic import SYSTEMD_NETWORK_CONFIG, Types, modspec, systemdbool
from ansible_module.module import SystemdUnitModule
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_NETWORK_CONFIG, Types, modspec, systemdbool
from ansible.module_utils.sebastian.base.module_utils.module import SystemdUnitModule
class Module(SystemdUnitModule): # type: ignore class Module(SystemdUnitModule): # type: ignore

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Union from typing import List, Union
from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, modspec try:
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, modspec
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types, modspec
from ansible.module_utils.sebastian.base.module_utils.module import SystemdReloadMixin, SystemdUnitModule, installable
@installable @installable

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Union from typing import List, Union
from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types try:
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types
from ansible.module_utils.sebastian.base.module_utils.module import SystemdReloadMixin, SystemdUnitModule, installable
@installable @installable

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Union from typing import List, Union
from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, systemdbool try:
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, systemdbool
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types, systemdbool
from ansible.module_utils.sebastian.base.module_utils.module import SystemdReloadMixin, SystemdUnitModule, installable
__module_name__ = "TargetModule" __module_name__ = "TargetModule"

Datei anzeigen

@ -2,8 +2,12 @@
import pathlib import pathlib
from typing import List, Union from typing import List, Union
from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, modpec try:
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable from ansible_module.generic import SYSTEMD_SERVICE_CONFIG, Types, modpec
from ansible_module.module import SystemdReloadMixin, SystemdUnitModule, installable
except ImportError:
from ansible.module_utils.sebastian.base.module_utils.generic import SYSTEMD_SERVICE_CONFIG, Types, modpec
from ansible.module_utils.sebastian.base.module_utils.module import SystemdReloadMixin, SystemdUnitModule, installable
@installable @installable
@ -11,7 +15,11 @@ class Module(SystemdUnitModule, SystemdReloadMixin): # type: ignore
"""Creates units""" """Creates units"""
name = "unit" name = "unit"
module_spec = modspec(argument_spec=dict(name=Types.str(required=True, help="Name of the unit"),)) module_spec = modspec(
argument_spec=dict(
name=Types.str(required=True, help="Name of the unit"),
)
)
def prepare(self): def prepare(self):
self.unitfile = (SYSTEMD_SERVICE_CONFIG / self.get("name")).with_suffix(".") self.unitfile = (SYSTEMD_SERVICE_CONFIG / self.get("name")).with_suffix(".")

Datei anzeigen

@ -1 +0,0 @@
ansible-module>=0.1.3