mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
(cherry picked from commit 85925eabea
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
89663a0688
commit
cf9b01ec6b
1 changed files with 22 additions and 0 deletions
|
@ -83,6 +83,8 @@ options:
|
|||
- 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.
|
||||
type: bool
|
||||
aliases: [ update-cache ]
|
||||
|
||||
|
@ -210,6 +212,26 @@ EXAMPLES = """
|
|||
# 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!
|
||||
#
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue