mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
[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:
parent
80206b5a53
commit
c355f93d62
5 changed files with 40 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue