mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
* cmd_runner: deprecate fmt as the name for the format class
* added changelog fragment
* fixing the deprecation comment
(cherry picked from commit 2d38c8d892
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
parent
7b78512c59
commit
3af9e39043
4 changed files with 13 additions and 3 deletions
2
changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml
Normal file
2
changelogs/fragments/4777-cmd-runner-deprecate-fmt.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
deprecated_features:
|
||||
- cmd_runner module utils - deprecated ``fmt`` in favour of ``cmd_runner_fmt`` as the parameter format object (https://github.com/ansible-collections/community.general/pull/4777).
|
|
@ -294,4 +294,12 @@ class _CmdRunnerContext(object):
|
|||
return False
|
||||
|
||||
|
||||
fmt = _Format()
|
||||
cmd_runner_fmt = _Format()
|
||||
|
||||
#
|
||||
# The fmt form is deprecated and will be removed in community.general 7.0.0
|
||||
# Please use:
|
||||
# cmd_runner_fmt
|
||||
# Or, to retain the same effect, use:
|
||||
# from ansible_collections.community.general.plugins.module_utils.cmd_runner import cmd_runner_fmt as fmt
|
||||
fmt = cmd_runner_fmt
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, fmt
|
||||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt
|
||||
|
||||
|
||||
def gconftool2_runner(module, **kwargs):
|
||||
|
|
|
@ -14,7 +14,7 @@ EXAMPLES = ""
|
|||
RETURN = ""
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, fmt
|
||||
from ansible_collections.community.general.plugins.module_utils.cmd_runner import CmdRunner, cmd_runner_fmt as fmt
|
||||
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Reference in a new issue