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

* module helper: delegate debug() to AnsibleModule

* add changelog frag

* add comments for future

* use deprecate()

* fix errors
This commit is contained in:
Alexei Znamensky 2025-01-21 07:38:14 +13:00 committed by GitHub
commit 7fa859a3b8
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
""""""""""