Change MH to use the module_utils.vardict.VarDict (#8226)

* change MH to use the module_utils.vardict.VarDict

* remove VarsMixin from superclasses of MH

* bump vardict deprecation to 11.0.0 + add old/new vardict selection in MH

* improve backawards compatibility

* improve backawards compatibility

* use new vardict in some modules, make adjustments

* add changelog frag

* adjustment after rebase
This commit is contained in:
Alexei Znamensky 2024-04-24 08:07:29 +12:00 committed by GitHub
commit 62138b288a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 56 additions and 12 deletions

View file

@ -187,6 +187,7 @@ class XFConfProperty(StateModuleHelper):
required_together=[('value', 'value_type')],
supports_check_mode=True,
)
use_old_vardict = False
default_state = 'present'
@ -196,7 +197,7 @@ class XFConfProperty(StateModuleHelper):
self.vars.channel)
self.vars.set('previous_value', self._get())
self.vars.set('type', self.vars.value_type)
self.vars.meta('value').set(initial_value=self.vars.previous_value)
self.vars.set_meta('value', initial_value=self.vars.previous_value)
def process_command_output(self, rc, out, err):
if err.rstrip() == self.does_not: