mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-04 15:29:10 -07:00
xfconf - deprecate get state in favour of the xfconf_info module (#3049)
* Deprecate get state in favour of the xfconf_info module * added changelog fragment * added comments in ignore files * Update changelogs/fragments/3049-xfconf-deprecate-get.yaml bummer, forgot that Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/system/xfconf.py Co-authored-by: Felix Fontein <felix@fontein.de> * Update plugins/modules/system/xfconf.py Co-authored-by: Felix Fontein <felix@fontein.de> Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
dc3e16113d
commit
d54d2fa4a6
5 changed files with 10 additions and 3 deletions
|
@ -48,6 +48,7 @@ options:
|
|||
type: str
|
||||
description:
|
||||
- The action to take upon the property/value.
|
||||
- State C(get) is deprecated and will be removed in community.general 5.0.0. Please use the module M(community.general.xfconf_info) instead.
|
||||
choices: [ get, present, absent ]
|
||||
default: "present"
|
||||
force_array:
|
||||
|
@ -225,6 +226,10 @@ class XFConfProperty(CmdMixin, StateMixin, ModuleHelper):
|
|||
def state_get(self):
|
||||
self.vars.value = self.vars.previous_value
|
||||
self.vars.previous_value = None
|
||||
self.module.deprecate(
|
||||
msg="State 'get' is deprecated. Please use the module community.general.xfconf_info instead",
|
||||
version="5.0.0", collection_name="community.general"
|
||||
)
|
||||
|
||||
def state_absent(self):
|
||||
if not self.module.check_mode:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue