Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gconftool2: deprecate state get #4778

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelogs/fragments/4778-gconftool2-deprecate-state-get.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
deprecated_features:
- gconftool2 - deprecates ``state=get`` in favor of using the module ``gconftool2_info`` (https://github.com/ansible-collections/community.general/pull/4778).
13 changes: 9 additions & 4 deletions plugins/modules/system/gconftool2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
type: str
description:
- A GConf preference key is an element in the GConf repository
that corresponds to an application preference. See man gconftool-2(1)
that corresponds to an application preference. See man gconftool-2(1).
required: yes
value:
type: str
description:
- Preference keys typically have simple values such as strings,
integers, or lists of strings and integers. This is ignored if the state
is "get". See man gconftool-2(1)
is "get". See man gconftool-2(1).
value_type:
type: str
description:
Expand All @@ -38,18 +38,19 @@
type: str
description:
- The action to take upon the key/value.
- State C(get) is deprecated and will be removed in community.general 8.0.0. Please use the module M(community.general.gconftool2_info) instead.
required: yes
choices: [ absent, get, present ]
config_source:
type: str
description:
- Specify a configuration source to use rather than the default path.
See man gconftool-2(1)
See man gconftool-2(1).
direct:
description:
- Access the config database directly, bypassing server. If direct is
specified then the config_source must be specified as well.
See man gconftool-2(1)
See man gconftool-2(1).
type: bool
default: 'no'
'''
Expand Down Expand Up @@ -119,6 +120,10 @@ def call(self, call_type, fail_onerr=True):
# If the call is "get", then we don't need as many parameters and
# we can ignore some
if call_type == 'get':
self.ansible.deprecate(
msg="State 'get' is deprecated. Please use the module community.general.gconftool2_info instead",
version="8.0.0", collection_name="community.general"
)
cmd.extend(["--get", self.key])
# Otherwise, we will use all relevant parameters
elif call_type == 'set':
Expand Down