1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-04-04 19:26:58 +00:00

[5.0.0] Bump version to 5.0.0, remove deprecated features (#4516)

* Remove deprecated features.

* Fix changelog.

* Remove ignore.txt entries.

* One more.

* Remove state=get tests.
This commit is contained in:
Felix Fontein 2022-04-26 11:45:15 +02:00 committed by GitHub
parent 29c49febd9
commit 54b2f0819d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 79 additions and 500 deletions

View file

@ -41,82 +41,60 @@ options:
- Directory of your project (see --working-dir). This is required when
the command is not run globally.
- Will be ignored if C(global_command=true).
- Alias C(working-dir) has been deprecated and will be removed in community.general 5.0.0.
aliases: [ working-dir ]
global_command:
description:
- Runs the specified command globally.
- Alias C(global-command) has been deprecated and will be removed in community.general 5.0.0.
type: bool
default: false
aliases: [ global-command ]
prefer_source:
description:
- Forces installation from package sources when possible (see --prefer-source).
- Alias C(prefer-source) has been deprecated and will be removed in community.general 5.0.0.
default: false
type: bool
aliases: [ prefer-source ]
prefer_dist:
description:
- Forces installation from package dist even for dev versions (see --prefer-dist).
- Alias C(prefer-dist) has been deprecated and will be removed in community.general 5.0.0.
default: false
type: bool
aliases: [ prefer-dist ]
no_dev:
description:
- Disables installation of require-dev packages (see --no-dev).
- Alias C(no-dev) has been deprecated and will be removed in community.general 5.0.0.
default: true
type: bool
aliases: [ no-dev ]
no_scripts:
description:
- Skips the execution of all scripts defined in composer.json (see --no-scripts).
- Alias C(no-scripts) has been deprecated and will be removed in community.general 5.0.0.
default: false
type: bool
aliases: [ no-scripts ]
no_plugins:
description:
- Disables all plugins ( see --no-plugins ).
- Alias C(no-plugins) has been deprecated and will be removed in community.general 5.0.0.
- Disables all plugins (see --no-plugins).
default: false
type: bool
aliases: [ no-plugins ]
optimize_autoloader:
description:
- Optimize autoloader during autoloader dump (see --optimize-autoloader).
- Convert PSR-0/4 autoloading to classmap to get a faster autoloader.
- Recommended especially for production, but can take a bit of time to run.
- Alias C(optimize-autoloader) has been deprecated and will be removed in community.general 5.0.0.
default: true
type: bool
aliases: [ optimize-autoloader ]
classmap_authoritative:
description:
- Autoload classes from classmap only.
- Implicitely enable optimize_autoloader.
- Recommended especially for production, but can take a bit of time to run.
- Alias C(classmap-authoritative) has been deprecated and will be removed in community.general 5.0.0.
default: false
type: bool
aliases: [ classmap-authoritative ]
apcu_autoloader:
description:
- Uses APCu to cache found/not-found classes
- Alias C(apcu-autoloader) has been deprecated and will be removed in community.general 5.0.0.
default: false
type: bool
aliases: [ apcu-autoloader ]
ignore_platform_reqs:
description:
- Ignore php, hhvm, lib-* and ext-* requirements and force the installation even if the local machine does not fulfill these.
- Alias C(ignore-platform-reqs) has been deprecated and will be removed in community.general 5.0.0.
default: false
type: bool
aliases: [ ignore-platform-reqs ]
composer_executable:
type: path
description:
@ -207,39 +185,17 @@ def main():
command=dict(default="install", type="str"),
arguments=dict(default="", type="str"),
executable=dict(type="path", aliases=["php_path"]),
working_dir=dict(
type="path", aliases=["working-dir"],
deprecated_aliases=[dict(name='working-dir', version='5.0.0', collection_name='community.general')]),
global_command=dict(
default=False, type="bool", aliases=["global-command"],
deprecated_aliases=[dict(name='global-command', version='5.0.0', collection_name='community.general')]),
prefer_source=dict(
default=False, type="bool", aliases=["prefer-source"],
deprecated_aliases=[dict(name='prefer-source', version='5.0.0', collection_name='community.general')]),
prefer_dist=dict(
default=False, type="bool", aliases=["prefer-dist"],
deprecated_aliases=[dict(name='prefer-dist', version='5.0.0', collection_name='community.general')]),
no_dev=dict(
default=True, type="bool", aliases=["no-dev"],
deprecated_aliases=[dict(name='no-dev', version='5.0.0', collection_name='community.general')]),
no_scripts=dict(
default=False, type="bool", aliases=["no-scripts"],
deprecated_aliases=[dict(name='no-scripts', version='5.0.0', collection_name='community.general')]),
no_plugins=dict(
default=False, type="bool", aliases=["no-plugins"],
deprecated_aliases=[dict(name='no-plugins', version='5.0.0', collection_name='community.general')]),
apcu_autoloader=dict(
default=False, type="bool", aliases=["apcu-autoloader"],
deprecated_aliases=[dict(name='apcu-autoloader', version='5.0.0', collection_name='community.general')]),
optimize_autoloader=dict(
default=True, type="bool", aliases=["optimize-autoloader"],
deprecated_aliases=[dict(name='optimize-autoloader', version='5.0.0', collection_name='community.general')]),
classmap_authoritative=dict(
default=False, type="bool", aliases=["classmap-authoritative"],
deprecated_aliases=[dict(name='classmap-authoritative', version='5.0.0', collection_name='community.general')]),
ignore_platform_reqs=dict(
default=False, type="bool", aliases=["ignore-platform-reqs"],
deprecated_aliases=[dict(name='ignore-platform-reqs', version='5.0.0', collection_name='community.general')]),
working_dir=dict(type="path"),
global_command=dict(default=False, type="bool"),
prefer_source=dict(default=False, type="bool"),
prefer_dist=dict(default=False, type="bool"),
no_dev=dict(default=True, type="bool"),
no_scripts=dict(default=False, type="bool"),
no_plugins=dict(default=False, type="bool"),
apcu_autoloader=dict(default=False, type="bool"),
optimize_autoloader=dict(default=True, type="bool"),
classmap_authoritative=dict(default=False, type="bool"),
ignore_platform_reqs=dict(default=False, type="bool"),
composer_executable=dict(type="path"),
),
required_if=[('global_command', False, ['working_dir'])],

View file

@ -33,8 +33,6 @@ options:
update_cache:
description:
- update the package database first C(apt-get update).
- Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0.
aliases: [ 'update-cache' ]
type: bool
default: no
author:
@ -158,9 +156,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
state=dict(type='str', default='present', choices=['absent', 'installed', 'present', 'removed']),
update_cache=dict(
type='bool', default=False, aliases=['update-cache'],
deprecated_aliases=[dict(name='update-cache', version='5.0.0', collection_name='community.general')]),
update_cache=dict(type='bool', default=False),
package=dict(type='list', elements='str', required=True, aliases=['name', 'pkg']),
),
)

View file

@ -49,10 +49,8 @@ options:
update_homebrew:
description:
- update homebrew itself first.
- Alias C(update-brew) has been deprecated and will be removed in community.general 5.0.0.
type: bool
default: no
aliases: ['update-brew']
upgrade_all:
description:
- upgrade all homebrew packages.
@ -892,9 +890,7 @@ def main():
),
update_homebrew=dict(
default=False,
aliases=["update-brew"],
type='bool',
deprecated_aliases=[dict(name='update-brew', version='5.0.0', collection_name='community.general')],
),
upgrade_all=dict(
default=False,

View file

@ -49,10 +49,8 @@ options:
description:
- Update homebrew itself first.
- Note that C(brew cask update) is a synonym for C(brew update).
- Alias C(update-brew) has been deprecated and will be removed in community.general 5.0.0.
type: bool
default: no
aliases: [ 'update-brew' ]
install_options:
description:
- Options flags to install a package.
@ -806,9 +804,7 @@ def main():
),
update_homebrew=dict(
default=False,
aliases=["update-brew"],
type='bool',
deprecated_aliases=[dict(name='update-brew', version='5.0.0', collection_name='community.general')],
),
install_options=dict(
default=None,

View file

@ -50,8 +50,6 @@ options:
update_cache:
description:
- Update the package DB first.
- Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0.
aliases: ['update-cache']
default: false
type: bool
requirements:
@ -177,9 +175,7 @@ def main():
state=dict(default="present", choices=["present", "installed", "absent", "removed"]),
force=dict(default="", choices=["", "depends", "maintainer", "reinstall", "overwrite", "downgrade", "space", "postinstall", "remove",
"checksum", "removal-of-dependent-packages"]),
update_cache=dict(
default="no", aliases=["update-cache"], type='bool',
deprecated_aliases=[dict(name='update-cache', version='5.0.0', collection_name='community.general')]),
update_cache=dict(default=False, type='bool'),
)
)

View file

@ -79,14 +79,11 @@ options:
description:
- Whether or not to refresh the master package lists.
- This can be run as part of a package installation or as a separate step.
- Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0.
- If not specified, it defaults to C(false).
- Please note that this option will only have an influence on the module's C(changed) state
if I(name) and I(upgrade) are not specified. This will change in community.general 5.0.0.
See the examples for how to make the module behave as it will in 5.0.0 right now, or how
to keep the current behavior with 5.0.0 and later.
- Please note that this option only had an influence on the module's C(changed) state
if I(name) and I(upgrade) are not specified before community.general 5.0.0.
See the examples for how to keep the old behavior.
type: bool
aliases: [ update-cache ]
update_cache_extra_args:
description:
@ -179,9 +176,8 @@ EXAMPLES = """
extra_args: --builddir /var/cache/yay
- name: Upgrade package foo
# The 'changed' state of this call will only indicate whether foo was
# installed/upgraded, but not on whether the cache was updated. This
# will change in community.general 5.0.0!
# The 'changed' state of this call will indicate whether the cache was
# updated *or* whether foo was installed/upgraded.
community.general.pacman:
name: foo
state: latest
@ -209,29 +205,15 @@ EXAMPLES = """
upgrade: yes
- name: Run the equivalent of "pacman -Syu" as a separate step
# The 'changed' state of this call will only indicate whether
# something was upgraded, but not on whether the cache was
# updated. This will change in community.general 5.0.0!
# Since community.general 5.0.0 the 'changed' state of this call
# will be 'true' in case the cache was updated, or when a package
# was updated.
#
# To keep the old behavior, add the following to the task:
# The previous behavior was to only indicate whether something was
# upgraded. To keep the old behavior, add the following to the task:
#
# register: result
# changed_when: result.packages | length > 0
#
# To already switch to the new behavior now, add:
#
# register: result
# changed_when: result is changed or result.cache_updated
#
# Note that both constructs only work with community.general 4.6.0+.
# For compatibility with older versions of community.general, you
# have to use
#
# changed_when: result.packages | default([]) | length > 0
#
# respectively
#
# changed_when: result is changed or (result.cache_updated | default(false))
community.general.pacman:
update_cache: yes
upgrade: yes
@ -328,11 +310,6 @@ class Pacman(object):
if not (self.m.params["name"] or self.m.params["upgrade"]):
self.success()
# Avoid shadowing lack of changes in the following stages
# so that `update_cache: true` doesn't always return changed
# TODO: remove this in community.general 5.0.0
self.changed = False
self.inventory = self._build_inventory()
if self.m.params["upgrade"]:
self.upgrade()
@ -769,17 +746,7 @@ def setup_module():
extra_args=dict(type="str", default=""),
upgrade=dict(type="bool"),
upgrade_extra_args=dict(type="str", default=""),
update_cache=dict(
type="bool",
aliases=["update-cache"],
deprecated_aliases=[
dict(
name="update-cache",
version="5.0.0",
collection_name="community.general",
)
],
),
update_cache=dict(type="bool"),
update_cache_extra_args=dict(type="str", default=""),
),
required_one_of=[["name", "update_cache", "upgrade"]],

View file

@ -41,11 +41,9 @@ options:
update_cache:
description:
- update the package database first
- Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0.
required: false
default: false
type: bool
aliases: [update-cache]
author: Kim Nørgaard (@KimNorgaard)
requirements: [ "Slackware >= 12.2" ]
@ -178,9 +176,7 @@ def main():
argument_spec=dict(
state=dict(default="present", choices=['installed', 'removed', 'absent', 'present', 'latest']),
name=dict(aliases=["pkg"], required=True, type='list', elements='str'),
update_cache=dict(
default=False, aliases=["update-cache"], type='bool',
deprecated_aliases=[dict(name='update-cache', version='5.0.0', collection_name='community.general')]),
update_cache=dict(default=False, type='bool'),
),
supports_check_mode=True)

View file

@ -33,17 +33,13 @@ options:
update_cache:
description:
- Update the package database first C(urpmi.update -a).
- Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0.
type: bool
default: no
aliases: ['update-cache']
no_recommends:
description:
- Corresponds to the C(--no-recommends) option for I(urpmi).
- Alias C(no-recommends) has been deprecated and will be removed in community.general 5.0.0.
type: bool
default: yes
aliases: ['no-recommends']
force:
description:
- Assume "yes" is the answer to any question urpmi has to ask.
@ -197,13 +193,9 @@ def main():
argument_spec=dict(
state=dict(type='str', default='present',
choices=['absent', 'installed', 'present', 'removed']),
update_cache=dict(
type='bool', default=False, aliases=['update-cache'],
deprecated_aliases=[dict(name='update-cache', version='5.0.0', collection_name='community.general')]),
update_cache=dict(type='bool', default=False),
force=dict(type='bool', default=True),
no_recommends=dict(
type='bool', default=True, aliases=['no-recommends'],
deprecated_aliases=[dict(name='no-recommends', version='5.0.0', collection_name='community.general')]),
no_recommends=dict(type='bool', default=True),
name=dict(type='list', elements='str', required=True, aliases=['package', 'pkg']),
root=dict(type='str', aliases=['installroot']),
),

View file

@ -42,8 +42,6 @@ options:
description:
- Whether or not to refresh the master package lists. This can be
run as part of a package installation or as a separate step.
- Alias C(update-cache) has been deprecated and will be removed in community.general 5.0.0.
aliases: ['update-cache']
type: bool
default: yes
upgrade:
@ -286,10 +284,8 @@ def main():
'removed']),
recurse=dict(default=False, type='bool'),
upgrade=dict(default=False, type='bool'),
update_cache=dict(
default=True, aliases=['update-cache'], type='bool',
deprecated_aliases=[dict(name='update-cache', version='5.0.0', collection_name='community.general')]),
upgrade_xbps=dict(default=True, type='bool')
update_cache=dict(default=True, type='bool'),
upgrade_xbps=dict(default=True, type='bool'),
),
required_one_of=[['name', 'update_cache', 'upgrade']],
supports_check_mode=True)