mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-08 19:50:30 -07:00
xfconf - state absent was not honoring check_mode (#2185)
* state absent was not honoring check_mode * added changelog fragment
This commit is contained in:
parent
6bea8215c9
commit
9a5191d1f9
2 changed files with 4 additions and 1 deletions
2
changelogs/fragments/2185-xfconf-absent-check-mode.yml
Normal file
2
changelogs/fragments/2185-xfconf-absent-check-mode.yml
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- xfconf - module was not honoring check mode when ``state`` was ``absent`` (https://github.com/ansible-collections/community.general/pull/2185).
|
|
@ -237,8 +237,9 @@ class XFConfProperty(CmdMixin, StateMixin, ModuleHelper):
|
||||||
self.update_xfconf_output(value=self.vars.value)
|
self.update_xfconf_output(value=self.vars.value)
|
||||||
|
|
||||||
def state_absent(self):
|
def state_absent(self):
|
||||||
|
if not self.module.check_mode:
|
||||||
|
self.run_command(params=('channel', 'property', {'reset': True}))
|
||||||
self.vars.value = None
|
self.vars.value = None
|
||||||
self.run_command(params=('channel', 'property', {'reset': True}))
|
|
||||||
self.update_xfconf_output(previous_value=self.vars.previous_value,
|
self.update_xfconf_output(previous_value=self.vars.previous_value,
|
||||||
value=None)
|
value=None)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue