1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Remove deprecated options, aliases and defaults (#3461)

* Remove deprecated options, aliases and defaults.

* Add changelog fragment.

* Small fixes.

* Apply suggestions from code review

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>

* Lint.

* Update plugins/modules/system/xfconf.py

Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>

* Bump galaxy version to 4.0.0.

Co-authored-by: Ajpantuso <ajpantuso@gmail.com>
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
Felix Fontein 2021-10-12 13:56:15 +02:00 committed by GitHub
parent 7038812465
commit 9546bbb55e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 68 additions and 194 deletions

View file

@ -0,0 +1,9 @@
removed_features:
- "ModuleHelper module utils - remove fallback when value could not be determined for a parameter (https://github.com/ansible-collections/community.general/pull/3461)."
- "proxmox - default value of ``proxmox_default_behavior`` changed to ``no_defaults`` (https://github.com/ansible-collections/community.general/pull/3461)."
- "proxmox_kvm - default value of ``proxmox_default_behavior`` changed to ``no_defaults`` (https://github.com/ansible-collections/community.general/pull/3461)."
- "grove - removed the deprecated alias ``message`` of the ``message_content`` option (https://github.com/ansible-collections/community.general/pull/3461)."
- "telegram - removed the deprecated ``msg``, ``msg_format`` and ``chat_id`` options (https://github.com/ansible-collections/community.general/pull/3461)."
- "cpanm - removed the deprecated ``system_lib`` option. Use Ansible's privilege escalation mechanism instead; the option basically used ``sudo`` (https://github.com/ansible-collections/community.general/pull/3461)."
- "runit - removed the deprecated ``dist`` option which was not used by the module (https://github.com/ansible-collections/community.general/pull/3461)."
- "xfconf - the default value of ``disable_facts`` changed to ``true``, and the value ``false`` is no longer allowed. Register the module results instead (https://github.com/ansible-collections/community.general/pull/3461)."

View file

@ -1,6 +1,6 @@
namespace: community
name: general
version: 3.7.0
version: 4.0.0
readme: README.md
authors:
- Ansible (https://github.com/ansible)

View file

@ -141,11 +141,7 @@ class CmdMixin(object):
fmt = find_format(param)
value = extra_params[param]
else:
self.module.deprecate("Cannot determine value for parameter: {0}. "
"From version 4.0.0 onwards this will generate an exception".format(param),
version="4.0.0", collection_name="community.general")
continue
raise self.ModuleHelperException('Cannot determine value for parameter: {0}'.format(param))
else:
raise self.ModuleHelperException("run_command parameter must be either a str or a dict: {0}".format(param))
cmd_args = add_arg_formatted_param(cmd_args, fmt, value)

View file

@ -13,7 +13,7 @@ short_description: management of instances in Proxmox VE cluster
description:
- allows you to create/delete/stop instances in Proxmox VE cluster
- Starting in Ansible 2.1, it automatically detects containerization type (lxc for PVE 4, openvz for older)
- From community.general 4.0.0 on, there will be no default values, see I(proxmox_default_behavior).
- Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior).
options:
password:
description:
@ -40,37 +40,27 @@ options:
comma-delimited list C([volume=]<volume> [,acl=<1|0>] [,mountoptions=<opt[;opt...]>] [,quota=<1|0>]
[,replicate=<1|0>] [,ro=<1|0>] [,shared=<1|0>] [,size=<DiskSize>])."
- See U(https://pve.proxmox.com/wiki/Linux_Container) for a full description.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(3). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(3).
type: str
cores:
description:
- Specify number of cores per socket.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(1). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1).
type: int
cpus:
description:
- numbers of allocated cpus for instance
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(1). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1).
type: int
memory:
description:
- memory size in MB for instance
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(512). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(512).
type: int
swap:
description:
- swap memory size in MB for instance
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(0). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(0).
type: int
netif:
description:
@ -94,9 +84,7 @@ options:
onboot:
description:
- specifies whether a VM will be started during system bootup
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(no). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no).
type: bool
storage:
description:
@ -106,9 +94,7 @@ options:
cpuunits:
description:
- CPU weight for a VM
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(1000). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1000).
type: int
nameserver:
description:
@ -168,16 +154,15 @@ options:
version_added: '0.2.0'
proxmox_default_behavior:
description:
- Various module options used to have default values. This cause problems when
user expects different behavior from proxmox by default or fill options which cause
problems when they have been set.
- The default value is C(compatibility), which will ensure that the default values
are used when the values are not explicitly specified by the user.
- From community.general 4.0.0 on, the default value will switch to C(no_defaults). To avoid
deprecation warnings, please set I(proxmox_default_behavior) to an explicit
value.
- As of community.general 4.0.0, various options no longer have default values.
These default values caused problems when users expected different behavior from Proxmox
by default or filled options which caused problems when set.
- The value C(compatibility) (default before community.general 4.0.0) will ensure that the default values
are used when the values are not explicitly specified by the user. The new default is C(no_defaults),
which makes sure these options have no defaults.
- This affects the I(disk), I(cores), I(cpus), I(memory), I(onboot), I(swap), I(cpuunits) options.
type: str
default: no_defaults
choices:
- compatibility
- no_defaults
@ -529,7 +514,7 @@ def main():
unprivileged=dict(type='bool', default=False),
description=dict(type='str'),
hookscript=dict(type='str'),
proxmox_default_behavior=dict(type='str', choices=['compatibility', 'no_defaults']),
proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']),
),
required_if=[('state', 'present', ['node', 'hostname', 'ostemplate'])],
required_together=[('api_token_id', 'api_token_secret')],
@ -558,13 +543,6 @@ def main():
template_store = module.params['ostemplate'].split(":")[0]
timeout = module.params['timeout']
if module.params['proxmox_default_behavior'] is None:
module.params['proxmox_default_behavior'] = 'compatibility'
module.deprecate(
'The proxmox_default_behavior option will change its default value from "compatibility" to '
'"no_defaults" in community.general 4.0.0. To remove this warning, please specify an explicit value for it now',
version='4.0.0', collection_name='community.general'
)
if module.params['proxmox_default_behavior'] == 'compatibility':
old_default_values = dict(
disk="3",

View file

@ -13,15 +13,13 @@ module: proxmox_kvm
short_description: Management of Qemu(KVM) Virtual Machines in Proxmox VE cluster.
description:
- Allows you to create/delete/stop Qemu(KVM) Virtual Machines in Proxmox VE cluster.
- From community.general 4.0.0 on, there will be no default values, see I(proxmox_default_behavior).
- Since community.general 4.0.0 on, there are no more default values, see I(proxmox_default_behavior).
author: "Abdoul Bah (@helldorado) <bahabdoul at gmail.com>"
options:
acpi:
description:
- Specify if ACPI should be enabled/disabled.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(yes). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(yes).
type: bool
agent:
description:
@ -31,24 +29,19 @@ options:
description:
- Pass arbitrary arguments to kvm.
- This option is for experts only!
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(-serial unix:/var/run/qemu-server/<vmid>.serial,server,nowait).
Note that the default value of I(proxmox_default_behavior) changes in community.general 4.0.0.
- If I(proxmox_default_behavior) is set to C(compatiblity), this option has a default of
C(-serial unix:/var/run/qemu-server/<vmid>.serial,server,nowait).
type: str
autostart:
description:
- Specify if the VM should be automatically restarted after crash (currently ignored in PVE API).
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(no). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no).
type: bool
balloon:
description:
- Specify the amount of RAM for the VM in MB.
- Using zero disables the balloon driver.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(0). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(0).
type: int
bios:
description:
@ -59,9 +52,7 @@ options:
description:
- Specify the boot order -> boot on floppy C(a), hard disk C(c), CD-ROM C(d), or network C(n).
- You can combine to set order.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(cnd). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(cnd).
type: str
bootdisk:
description:
@ -97,16 +88,12 @@ options:
cores:
description:
- Specify number of cores per socket.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(1). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1).
type: int
cpu:
description:
- Specify emulated CPU type.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(kvm64). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(kvm64).
type: str
cpulimit:
description:
@ -117,9 +104,7 @@ options:
description:
- Specify CPU weight for a VM.
- You can disable fair-scheduler configuration by setting this to 0
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(1000). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1000).
type: int
delete:
description:
@ -139,19 +124,15 @@ options:
description:
- Allow to force stop VM.
- Can be used with states C(stopped), C(restarted) and C(absent).
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(no). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no).
type: bool
format:
description:
- Target drive's backing file's data format.
- Used only with clone
- Use I(format=unspecified) and I(full=false) for a linked clone.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(qcow2). If I(proxmox_default_behavior) is set to C(no_defaults),
not specifying this option is equivalent to setting it to C(unspecified).
Note that the default value of I(proxmox_default_behavior) changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(qcow2).
If I(proxmox_default_behavior) is set to C(no_defaults), not specifying this option is equivalent to setting it to C(unspecified).
type: str
choices: [ "cloop", "cow", "qcow", "qcow2", "qed", "raw", "vmdk", "unspecified" ]
freeze:
@ -216,9 +197,7 @@ options:
kvm:
description:
- Enable/disable KVM hardware virtualization.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(yes). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(yes).
type: bool
localtime:
description:
@ -238,9 +217,7 @@ options:
memory:
description:
- Memory size in MB for instance.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(512). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(512).
type: int
migrate_downtime:
description:
@ -296,17 +273,13 @@ options:
onboot:
description:
- Specifies whether a VM will be started during system bootup.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(yes). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(yes).
type: bool
ostype:
description:
- Specifies guest operating system. This is used to enable special optimization/features for specific operating systems.
- The l26 is Linux 2.6/3.X Kernel.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(l26). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(l26).
type: str
choices: ['other', 'wxp', 'w2k', 'w2k3', 'w2k8', 'wvista', 'win7', 'win8', 'win10', 'l24', 'l26', 'solaris']
parallel:
@ -387,9 +360,7 @@ options:
sockets:
description:
- Sets the number of CPU sockets. (1 - N).
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(1). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(1).
type: int
sshkeys:
description:
@ -421,9 +392,7 @@ options:
tablet:
description:
- Enables/disables the USB tablet device.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(no). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no).
type: bool
tags:
description:
@ -445,9 +414,7 @@ options:
template:
description:
- Enables/disables the template.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(no). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(no).
type: bool
timeout:
description:
@ -469,9 +436,7 @@ options:
vga:
description:
- Select VGA type. If you want to use high resolution modes (>= 1280x1024x16) then you should use option 'std' or 'vmware'.
- If I(proxmox_default_behavior) is set to C(compatiblity) (the default value), this
option has a default of C(std). Note that the default value of I(proxmox_default_behavior)
changes in community.general 4.0.0.
- This option has no default unless I(proxmox_default_behavior) is set to C(compatiblity); then the default is C(std).
type: str
choices: ['std', 'cirrus', 'vmware', 'qxl', 'serial0', 'serial1', 'serial2', 'serial3', 'qxl2', 'qxl3', 'qxl4']
virtio:
@ -489,18 +454,17 @@ options:
type: str
proxmox_default_behavior:
description:
- Various module options used to have default values. This cause problems when
user expects different behavior from proxmox by default or fill options which cause
problems when they have been set.
- The default value is C(compatibility), which will ensure that the default values
are used when the values are not explicitly specified by the user.
- From community.general 4.0.0 on, the default value will switch to C(no_defaults). To avoid
deprecation warnings, please set I(proxmox_default_behavior) to an explicit
value.
- As of community.general 4.0.0, various options no longer have default values.
These default values caused problems when users expected different behavior from Proxmox
by default or filled options which caused problems when set.
- The value C(compatibility) (default before community.general 4.0.0) will ensure that the default values
are used when the values are not explicitly specified by the user. The new default is C(no_defaults),
which makes sure these options have no defaults.
- This affects the I(acpi), I(autostart), I(balloon), I(boot), I(cores), I(cpu),
I(cpuunits), I(force), I(format), I(kvm), I(memory), I(onboot), I(ostype), I(sockets),
I(tablet), I(template), I(vga), options.
type: str
default: no_defaults
choices:
- compatibility
- no_defaults
@ -1091,7 +1055,7 @@ def main():
virtio=dict(type='dict'),
vmid=dict(type='int'),
watchdog=dict(),
proxmox_default_behavior=dict(type='str', choices=['compatibility', 'no_defaults']),
proxmox_default_behavior=dict(type='str', default='no_defaults', choices=['compatibility', 'no_defaults']),
),
mutually_exclusive=[('delete', 'revert'), ('delete', 'update'), ('revert', 'update'), ('clone', 'update'), ('clone', 'delete'), ('clone', 'revert')],
required_together=[('api_token_id', 'api_token_secret')],
@ -1122,13 +1086,6 @@ def main():
vmid = module.params['vmid']
validate_certs = module.params['validate_certs']
if module.params['proxmox_default_behavior'] is None:
module.params['proxmox_default_behavior'] = 'compatibility'
module.deprecate(
'The proxmox_default_behavior option will change its default value from "compatibility" to '
'"no_defaults" in community.general 4.0.0. To remove this warning, please specify an explicit value for it now',
version='4.0.0', collection_name='community.general'
)
if module.params['proxmox_default_behavior'] == 'compatibility':
old_default_values = dict(
acpi=True,

View file

@ -33,8 +33,6 @@ options:
- Message content.
- The alias I(message) is deprecated and will be removed in community.general 4.0.0.
required: true
aliases:
- message
url:
type: str
description:
@ -95,9 +93,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
channel_token=dict(type='str', required=True, no_log=True),
message_content=dict(type='str', required=True, aliases=['message'],
deprecated_aliases=[dict(name='message', version='4.0.0',
collection_name='community.general')]),
message_content=dict(type='str', required=True),
service=dict(type='str', default='ansible'),
url=dict(type='str', default=None),
icon_url=dict(type='str', default=None),

View file

@ -22,8 +22,6 @@ description:
- Also, the user may try to use any other telegram bot API method, if you specify I(api_method) argument.
notes:
- You will require a telegram account and create telegram bot to use this module.
- The options I(msg), I(msg_format) and I(chat_id) have been deprecated and will be removed in community.general
4.0.0. Use the corresponding variables in I(api_args) instead. See the examples for how that works.
options:
token:
type: str
@ -43,22 +41,6 @@ options:
- Any parameters for the method.
- For reference to default method, C(SendMessage), see U(https://core.telegram.org/bots/api#sendmessage).
version_added: 2.0.0
msg:
type: str
description:
- (Deprecated) What message you wish to send.
msg_format:
type: str
description:
- (Deprecated) Message format. Formatting options C(markdown), C(MarkdownV2), and C(html) described in
Telegram API docs (https://core.telegram.org/bots/api#formatting-options).
If option C(plain) set, message will not be formatted.
default: plain
choices: [ "plain", "markdown", "MarkdownV2", "html" ]
chat_id:
type: str
description:
- (Deprecated) Telegram group or user chat_id.
'''
@ -83,12 +65,6 @@ EXAMPLES = """
from_chat_id: 111111
disable_notification: True
message_id: '{{ saved_msg_id }}'
- name: Send a message to chat in playbook (deprecated old style)
community.general.telegram:
token: '9999999:XXXXXXXXXXXXXXXXXXXXXXX'
chat_id: 000000
msg: Ansible task finished
"""
RETURN = """
@ -119,11 +95,6 @@ def main():
token=dict(type='str', required=True, no_log=True),
api_args=dict(type='dict'),
api_method=dict(type="str", default="SendMessage"),
chat_id=dict(type='str', no_log=True, removed_in_version='4.0.0',
removed_from_collection='community.general'),
msg=dict(type='str', removed_in_version='4.0.0', removed_from_collection='community.general'),
msg_format=dict(type='str', choices=['plain', 'markdown', 'html', 'MarkdownV2'], default='plain',
removed_in_version='4.0.0', removed_from_collection='community.general'),
),
supports_check_mode=True
)
@ -132,9 +103,9 @@ def main():
api_args = module.params.get('api_args') or {}
api_method = module.params.get('api_method')
# filling backward compatibility args
api_args['chat_id'] = api_args.get('chat_id') or module.params.get('chat_id')
api_args['parse_mode'] = api_args.get('parse_mode') or module.params.get('msg_format')
api_args['text'] = api_args.get('text') or module.params.get('msg')
api_args['chat_id'] = api_args.get('chat_id')
api_args['parse_mode'] = api_args.get('parse_mode')
api_args['text'] = api_args.get('text')
if api_args['parse_mode'] == 'plain':
del api_args['parse_mode']

View file

@ -53,16 +53,6 @@ options:
description:
- Version specification for the perl module. When I(mode) is C(new), C(cpanm) version operators are accepted.
type: str
system_lib:
description:
- Use this if you want to install modules to the system perl include path. You must be root or have "passwordless" sudo for this to work.
- This uses the cpanm commandline option C(--sudo), which has nothing to do with ansible privilege escalation.
- >
This option is not recommended for use and it will be deprecated in the future. If you need to escalate privileges
please consider using any of the multiple mechanisms available in Ansible.
type: bool
default: no
aliases: ['use_sudo']
executable:
description:
- Override the path to the cpanm executable.
@ -160,8 +150,6 @@ class CPANMinus(CmdMixin, ModuleHelper):
mirror=dict(type='str'),
mirror_only=dict(type='bool', default=False),
installdeps=dict(type='bool', default=False),
system_lib=dict(type='bool', default=False, aliases=['use_sudo'],
removed_in_version="4.0.0", removed_from_collection="community.general"),
executable=dict(type='path'),
mode=dict(type='str', choices=['compatibility', 'new'], default='compatibility'),
name_check=dict(type='str')
@ -176,7 +164,6 @@ class CPANMinus(CmdMixin, ModuleHelper):
mirror=dict(fmt=('--mirror', '{0}'),),
mirror_only=dict(fmt="--mirror-only", style=ArgFormat.BOOLEAN),
installdeps=dict(fmt="--installdeps", style=ArgFormat.BOOLEAN),
system_lib=dict(fmt="--sudo", style=ArgFormat.BOOLEAN),
)
check_rc = True
@ -188,8 +175,6 @@ class CPANMinus(CmdMixin, ModuleHelper):
else:
if v.name and v.from_path:
raise ModuleHelperException("Parameters 'name' and 'from_path' are mutually exclusive when 'mode=new'")
if v.system_lib:
raise ModuleHelperException("Parameter 'system_lib' is invalid when 'mode=new'")
self.command = self.module.get_bin_path(v.executable if v.executable else self.command)
self.vars.set("binary", self.command)
@ -230,7 +215,7 @@ class CPANMinus(CmdMixin, ModuleHelper):
return
pkg_spec = v[pkg_param]
self.changed = self.run_command(
params=['notest', 'locallib', 'mirror', 'mirror_only', 'installdeps', 'system_lib', {'name': pkg_spec}],
params=['notest', 'locallib', 'mirror', 'mirror_only', 'installdeps', {'name': pkg_spec}],
)
else:
installed = self._is_package_installed(v.name_check, v.locallib, v.version) if v.name_check else False

View file

@ -217,7 +217,6 @@ def main():
name=dict(type='str', required=True),
state=dict(type='str', choices=['killed', 'once', 'reloaded', 'restarted', 'started', 'stopped']),
enabled=dict(type='bool'),
dist=dict(type='str', removed_in_version='4.0.0', removed_from_collection='community.general'),
service_dir=dict(type='str', default='/var/service'),
service_src=dict(type='str', default='/etc/sv'),
),

View file

@ -60,11 +60,10 @@ options:
version_added: 1.0.0
disable_facts:
description:
- For backward compatibility, output results are also returned as C(ansible_facts), but this behaviour is deprecated
and will be removed in community.general 4.0.0.
- This flag disables the output as facts and also disables the deprecation warning.
- The value C(false) is no longer allowed since community.general 4.0.0.
- This option will be deprecated in a future version, and eventually be removed.
type: bool
default: no
default: true
version_added: 2.1.0
'''
@ -129,7 +128,7 @@ RETURN = '''
'''
from ansible_collections.community.general.plugins.module_utils.module_helper import (
ModuleHelper, CmdMixin, StateMixin, ArgFormat
ModuleHelper, CmdMixin, StateMixin, ArgFormat, ModuleHelperException
)
@ -168,7 +167,7 @@ class XFConfProperty(CmdMixin, StateMixin, ModuleHelper):
elements='str', choices=('int', 'uint', 'bool', 'float', 'double', 'string')),
value=dict(required=False, type='list', elements='raw'),
force_array=dict(default=False, type='bool', aliases=['array']),
disable_facts=dict(type='bool', default=False),
disable_facts=dict(type='bool', default=True),
),
required_if=[('state', 'present', ['value', 'value_type'])],
required_together=[('value', 'value_type')],
@ -196,15 +195,8 @@ class XFConfProperty(CmdMixin, StateMixin, ModuleHelper):
self.vars.set('type', self.vars.value_type, fact=True)
self.vars.meta('value').set(initial_value=self.vars.previous_value)
if not self.module.params['disable_facts']:
self.facts_name = "xfconf"
self.module.deprecate(
msg="Returning results as facts is deprecated. "
"Please register the module output to a variable instead."
" You can use the disable_facts option to switch to the "
"new behavior already now and disable this warning",
version="4.0.0", collection_name="community.general"
)
if self.module.params['disable_facts'] is False:
raise ModuleHelperException('Returning results as facts has been removed. Stop using disable_facts=false.')
def process_command_output(self, rc, out, err):
if err.rstrip() == self.does_not:

View file

@ -17,7 +17,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
plugins/modules/notification/grove.py validate-modules:invalid-argument-name # invalid alias - removed in 4.0.0
plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/apt_rpm.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/homebrew.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
@ -45,7 +44,6 @@ plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice
plugins/modules/system/puppet.py use-argspec-type-path
plugins/modules/system/puppet.py validate-modules:doc-default-does-not-match-spec # show_diff is not documented
plugins/modules/system/puppet.py validate-modules:parameter-type-not-in-doc
plugins/modules/system/runit.py validate-modules:parameter-type-not-in-doc # param removed in 4.0.0
plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path
plugins/modules/system/xfconf.py validate-modules:parameter-state-invalid-choice # state get removed in 5.0.0
plugins/modules/system/xfconf.py validate-modules:return-syntax-error

View file

@ -16,7 +16,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
plugins/modules/notification/grove.py validate-modules:invalid-argument-name # invalid alias - removed in 4.0.0
plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/apt_rpm.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/homebrew.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
@ -44,7 +43,6 @@ plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice
plugins/modules/system/puppet.py use-argspec-type-path
plugins/modules/system/puppet.py validate-modules:doc-default-does-not-match-spec # show_diff is not documented
plugins/modules/system/puppet.py validate-modules:parameter-type-not-in-doc
plugins/modules/system/runit.py validate-modules:parameter-type-not-in-doc # param removed in 4.0.0
plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path
plugins/modules/system/xfconf.py validate-modules:parameter-state-invalid-choice # state get removed in 5.0.0
plugins/modules/system/xfconf.py validate-modules:return-syntax-error

View file

@ -16,7 +16,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
plugins/modules/notification/grove.py validate-modules:invalid-argument-name # invalid alias - removed in 4.0.0
plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/apt_rpm.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/homebrew.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
@ -44,7 +43,6 @@ plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice
plugins/modules/system/puppet.py use-argspec-type-path
plugins/modules/system/puppet.py validate-modules:doc-default-does-not-match-spec # show_diff is not documented
plugins/modules/system/puppet.py validate-modules:parameter-type-not-in-doc
plugins/modules/system/runit.py validate-modules:parameter-type-not-in-doc # param removed in 4.0.0
plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path
plugins/modules/system/xfconf.py validate-modules:parameter-state-invalid-choice # state get removed in 5.0.0
plugins/modules/system/xfconf.py validate-modules:return-syntax-error

View file

@ -16,7 +16,6 @@ plugins/modules/cloud/univention/udm_user.py validate-modules:parameter-list-no-
plugins/modules/clustering/consul/consul.py validate-modules:doc-missing-type
plugins/modules/clustering/consul/consul.py validate-modules:undocumented-parameter
plugins/modules/clustering/consul/consul_session.py validate-modules:parameter-state-invalid-choice
plugins/modules/notification/grove.py validate-modules:invalid-argument-name # invalid alias - removed in 4.0.0
plugins/modules/packaging/language/composer.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/apt_rpm.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
plugins/modules/packaging/os/homebrew.py validate-modules:parameter-invalid # invalid alias - removed in 5.0.0
@ -44,7 +43,6 @@ plugins/modules/system/parted.py validate-modules:parameter-state-invalid-choice
plugins/modules/system/puppet.py use-argspec-type-path
plugins/modules/system/puppet.py validate-modules:doc-default-does-not-match-spec # show_diff is not documented
plugins/modules/system/puppet.py validate-modules:parameter-type-not-in-doc
plugins/modules/system/runit.py validate-modules:parameter-type-not-in-doc # param removed in 4.0.0
plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path
plugins/modules/system/xfconf.py validate-modules:parameter-state-invalid-choice # state get removed in 5.0.0
plugins/modules/system/xfconf.py validate-modules:return-syntax-error

View file

@ -64,7 +64,6 @@ plugins/modules/source_control/github/github_deploy_key.py validate-modules:para
plugins/modules/system/iptables_state.py validate-modules:undocumented-parameter
plugins/modules/system/puppet.py use-argspec-type-path
plugins/modules/system/puppet.py validate-modules:parameter-type-not-in-doc
plugins/modules/system/runit.py validate-modules:parameter-type-not-in-doc # deprecated param - removed in 4.0.0
plugins/modules/system/ssh_config.py use-argspec-type-path # Required since module uses other methods to specify path
plugins/modules/system/xfconf.py validate-modules:return-syntax-error
plugins/modules/web_infrastructure/jenkins_plugin.py use-argspec-type-path