ModuleHelper - fix bug when adjusting conflicting output (#5755)

* ModuleHelper - fix bug when adjusting conflicting output

* add changelog fragment

* remove commented test code
This commit is contained in:
Alexei Znamensky 2023-01-04 23:59:06 +13:00 committed by GitHub
commit b49bf081f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 2 deletions

View file

@ -35,12 +35,13 @@ from ansible_collections.community.general.plugins.module_utils.mh.deco import c
class MSimple(ModuleHelper):
output_params = ('a', 'b', 'c')
output_params = ('a', 'b', 'c', 'm')
module = dict(
argument_spec=dict(
a=dict(type='int', default=0),
b=dict(type='str'),
c=dict(type='str'),
m=dict(type='str'),
),
supports_check_mode=True,
)
@ -65,6 +66,9 @@ class MSimple(ModuleHelper):
self.vars['c'] = str(self.vars.c) * 2
self.process_a3_bc()
if self.vars.m:
self.vars.msg = self.vars.m
def main():
msimple = MSimple()