Commits vergleichen

...

2 Commits

Autor SHA1 Nachricht Datum
Sebastian Tobie 1da65334e2 added an default display 2024-03-12 21:18:09 +01:00
Sebastian Tobie 47c8d3319e added fragments again 2024-03-12 21:10:44 +01:00
8 geänderte Dateien mit 23 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -9,10 +9,14 @@ releases:
0.3.0:
changes:
release_summary: rewrote the Types helper
fragments:
- types.yml
release_date: "2024-02-24"
0.3.1:
changes:
release_summary: removed forgotten print calls
fragments:
- print_calls.yml
release_date: "2024-02-24"
0.4.0:
release_date: "2024-03-08"
@ -20,3 +24,5 @@ releases:
release_summary: |
to prevent empty sections, the install and header methods return None if the method would just the scetion
header
fragments:
- sectioning.yml

Datei anzeigen

@ -3,7 +3,7 @@ changelog_filename_version_depth: 0
changes_file: changelog.yaml
changes_format: combined
ignore_other_fragment_extensions: true
keep_fragments: false
keep_fragments: true
mention_ancestor: true
new_plugins_after_name: removed_features
notesdir: fragments

Datei anzeigen

@ -0,0 +1,2 @@
---
release_summary: change the module to an ansible module

Datei anzeigen

@ -0,0 +1,2 @@
---
release_summary: added an default Display to the module

Datei anzeigen

@ -0,0 +1,2 @@
---
release_summary: removed forgotten print calls

Datei anzeigen

@ -0,0 +1,4 @@
---
release_summary: |
to prevent empty sections, the install and header methods return None if the method would just the scetion
header

Datei anzeigen

@ -0,0 +1,2 @@
---
release_summary: rewrote the Types helper

Datei anzeigen

@ -1,6 +1,7 @@
import pathlib
from copy import deepcopy
from typing import Any, Callable, ClassVar, Dict, NoReturn, Optional, Type, TypeVar, Union, overload
from ansible.utils.display import Display
import ansible.module_utils.basic as basic
@ -55,6 +56,8 @@ class AnsibleModule(object):
module_spec: ClassVar[dict]
#: This is set by classes that define common things for their subclasses, like behaviour of the run and check methods. This is used by `SystemdUnitModule`
_common_args: ClassVar[dict[str, Any]] = dict()
#: For log messages
display: Display
@property
def params(self) -> Dict[str, Any]:
@ -70,6 +73,7 @@ class AnsibleModule(object):
specs["argument_spec"].update(modspec["argument_spec"])
del modspec["argument_spec"]
specs.update(modspec)
self.display = Display()
self.module = basic.AnsibleModule(**specs)
self.tmpdir = pathlib.Path(self.module.tmpdir)