diff --git a/library/packaging/pacman b/library/packaging/pacman index 5bf2d931e6e..0b23a2f93ce 100644 --- a/library/packaging/pacman +++ b/library/packaging/pacman @@ -204,6 +204,9 @@ def main(): if not p['name']: module.exit_json(changed=True, msg='updated the package master lists') + if p['update_cache'] and module.check_mode and not p['name']: + module.exit_json(changed=True, msg='Would have updated the package cache') + if p['name']: pkgs = p['name'].split(',')