From bc0f99386b509ca2a6bb5ddae5ef79bf0e4b3e8d Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Fri, 11 Nov 2022 09:18:52 +1300 Subject: [PATCH] xfconf: prune deprecated facts-generation code (#5502) * xfconf: prune deprecated facts-generatin code * add changelog fragment * adjust changelog fragment * Update changelogs/fragments/5502-xfconf-facts-deprecation.yml Co-authored-by: Felix Fontein Co-authored-by: Felix Fontein --- changelogs/fragments/5502-xfconf-facts-deprecation.yml | 6 ++++++ plugins/modules/xfconf.py | 7 ++----- 2 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 changelogs/fragments/5502-xfconf-facts-deprecation.yml diff --git a/changelogs/fragments/5502-xfconf-facts-deprecation.yml b/changelogs/fragments/5502-xfconf-facts-deprecation.yml new file mode 100644 index 0000000000..776d852700 --- /dev/null +++ b/changelogs/fragments/5502-xfconf-facts-deprecation.yml @@ -0,0 +1,6 @@ +removed_features: + - > + xfconf - generating facts was deprecated in community.general 3.0.0, + however two factoids, ``previous_value`` and ``type`` continued to be generated by mistake. This behaviour + has been removed and ``xfconf`` generate no facts whatsoever + (https://github.com/ansible-collections/community.general/pull/5502). diff --git a/plugins/modules/xfconf.py b/plugins/modules/xfconf.py index c231a47484..6776ef888e 100644 --- a/plugins/modules/xfconf.py +++ b/plugins/modules/xfconf.py @@ -195,15 +195,12 @@ class XFConfProperty(StateModuleHelper): default_state = 'present' - def update_xfconf_output(self, **kwargs): - self.update_vars(meta={"output": True, "fact": True}, **kwargs) - def __init_module__(self): self.runner = xfconf_runner(self.module) self.does_not = 'Property "{0}" does not exist on channel "{1}".'.format(self.vars.property, self.vars.channel) - self.vars.set('previous_value', self._get(), fact=True) - self.vars.set('type', self.vars.value_type, fact=True) + 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) if self.vars.disable_facts is False: