[PR #9577/7fa859a3 backport][stable-10] module helper: delegate debug() to AnsibleModule (#9591)

module helper: delegate debug() to AnsibleModule (#9577)

* module helper: delegate debug() to AnsibleModule

* add changelog frag

* add comments for future

* use deprecate()

* fix errors

(cherry picked from commit 7fa859a3b8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2025-01-20 20:03:59 +01:00 committed by GitHub
parent fed5965518
commit c394fbe8e9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 0 deletions

View file

@ -468,6 +468,11 @@ Additionally, MH will also delegate:
- ``diff_mode`` to ``self.module._diff``
- ``verbosity`` to ``self.module._verbosity``
Starting in community.general 10.3.0, MH will also delegate the method ``debug`` to ``self.module``.
If any existing module already has a ``debug`` attribute defined, a warning message will be generated,
requesting it to be renamed. Upon the release of community.general 12.0.0, the delegation will be
preemptive and will override any existing method or property in the subclasses.
Decorators
""""""""""