[stable-1] xfconf - state absent was not honoring check_mode (#2185) (#2187)

* xfconf - state absent was not honoring check_mode (#2185)

* state absent was not honoring check_mode

* added changelog fragment

* adjusted run_command() call for stable-1
This commit is contained in:
Alexei Znamensky 2021-04-07 20:20:30 +12:00 committed by GitHub
commit f534ecbd2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -219,8 +219,9 @@ class XFConfProperty(CmdMixin, StateMixin, ModuleHelper):
self.update_xfconf_output(value=self.vars.value)
def state_absent(self):
if not self.module.check_mode:
self.run_command(params=('channel', 'property', 'reset'), extra_params={"reset": True})
self.vars.value = None
self.run_command(params=('channel', 'property', 'reset'), extra_params={"reset": True})
self.update_xfconf_output(previous_value=self.vars.previous_value,
value=None)