minor fixes in doc guides (#10770)

This commit is contained in:
Alexei Znamensky 2025-08-31 21:43:36 +12:00 committed by GitHub
commit 3cc4f28fd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View file

@ -22,6 +22,7 @@ The same example from the Developer Guide would become:
from ansible_collections.community.general.plugins.module_utils import deps from ansible_collections.community.general.plugins.module_utils import deps
with deps.declare("foo"): with deps.declare("foo"):
import foo import foo

View file

@ -74,6 +74,7 @@ section above, but there are more elements that will take part in it.
from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper from ansible_collections.community.general.plugins.module_utils.module_helper import ModuleHelper
class MyTest(ModuleHelper): class MyTest(ModuleHelper):
# behavior for module paramaters ONLY, see below for further information # behavior for module paramaters ONLY, see below for further information
output_params = () output_params = ()
@ -253,9 +254,9 @@ With that, MH will automatically generate the diff output for variables that hav
class MyTest(ModuleHelper): class MyTest(ModuleHelper):
diff_params = ('value', ) diff_params = ('value', )
def __run__(self): def __run__(self):
# example from community.general.gio_mime # example from community.general.gio_mime
self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True) self.vars.set_meta("handler", initial_value=gio_mime_get(self.runner, self.vars.mime_type), diff=True, change=True)
.. important:: .. important::