[PR #5755/b49bf081 backport][stable-6] ModuleHelper - fix bug when adjusting conflicting output (#5758)

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

* ModuleHelper - fix bug when adjusting conflicting output

* add changelog fragment

* remove commented test code

(cherry picked from commit b49bf081f8)

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
patchback[bot] 2023-01-04 21:40:56 +01:00 committed by GitHub
parent 80206b5a53
commit c355f93d62
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()