mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
[PR #5765/dc531b18 backport][stable-6] ModuleHelper - lax handling of conflicting output (#5775)
ModuleHelper - lax handling of conflicting output (#5765)
* ModuleHelper - lax handling of conflicting output
* add changelog fragment
* only create _var when really needed
* adjust changelog
* Update changelogs/fragments/5765-mh-lax-output-conflict.yml
Co-authored-by: Felix Fontein <felix@fontein.de>
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit dc531b183d
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
d95a821d5b
commit
8bc5494ad5
5 changed files with 52 additions and 13 deletions
|
@ -57,6 +57,8 @@ class MSimple(ModuleHelper):
|
|||
self.vars['c'] = str(self.vars.c) * 3
|
||||
|
||||
def __run__(self):
|
||||
if self.vars.m:
|
||||
self.vars.msg = self.vars.m
|
||||
if self.vars.a >= 100:
|
||||
raise Exception("a >= 100")
|
||||
if self.vars.c == "abc change":
|
||||
|
@ -66,9 +68,6 @@ 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