25 lines
595 B
Python
25 lines
595 B
Python
# Copyright: (c) 2024, Luca Bilke <luca@bil.ke>
|
|
# MIT License (see LICENSE)
|
|
|
|
from __future__ import annotations
|
|
|
|
from dataclasses import dataclass, field
|
|
from typing import TYPE_CHECKING, Any
|
|
|
|
if TYPE_CHECKING:
|
|
from ansible.module_utils.basic import AnsibleModule # pyright: ignore[reportMissingTypeStubs]
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class Result:
|
|
changed: bool = False
|
|
diff: dict[str, Any] = field(default_factory=dict)
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class State:
|
|
module: AnsibleModule
|
|
result: Result
|
|
compose_filepath: str
|
|
before: dict[str, Any]
|
|
after: dict[str, Any]
|